]> git.pld-linux.org Git - packages/vpb-driver.git/blob - vpb-driver.spec
- rebuild for kernel-3.9.5-1 /home/users/baggins/devel/PLD/rpm/packages
[packages/vpb-driver.git] / vpb-driver.spec
1 #
2 # Conditional build:
3 %bcond_without  dist_kernel     # without distribution kernel
4 %bcond_without  kernel          # don't build kernel modules
5 %bcond_without  userspace       # don't build userspace package
6 %bcond_without  static_libs     # don't build static libraries
7 %bcond_with     pri             # ISDN devices support (modified libpri)
8 #
9 %if "%{_alt_kernel}" != "%{nil}"
10 %undefine       with_userspace
11 %endif
12 %if %{without kernel}
13 %undefine       with_dist_kernel
14 %endif
15
16 %define rel     2
17 %define         pname   vpb-driver
18 Summary:        Voicetronix voice processing board (VPB) driver software
19 Summary(pl.UTF-8):      Oprogramowanie sterowników dla kart przetwarzających głos (VPB) Voicetronix
20 Name:           %{pname}%{_alt_kernel}
21 Version:        4.2.56
22 Release:        %{rel}
23 License:        LGPL v2.1+ (libraries), GPL v2+ (libpri library, kernel module)
24 Group:          Libraries
25 Source0:        http://www.voicetronix.com.au/Downloads/vpb-driver-4.x/%{pname}-%{version}.tar.gz
26 # Source0-md5:  aa7442b5b98a566fe67544115d83e20a
27 Patch0:         %{pname}-make.patch
28 Patch1:         %{pname}-kernel.patch
29 Patch2:         linux-3.8.patch
30 URL:            http://www.voicetronix.com.au/downloads.htm#linux
31 %if %{with dist_kernel}
32 BuildRequires:  kernel%{_alt_kernel}-module-build
33 %endif
34 BuildRequires:  autoconf >= 2.59
35 BuildRequires:  libstdc++-devel
36 BuildRequires:  pciutils-devel
37 BuildRequires:  rpmbuild(macros) >= 1.379
38 BuildRequires:  sed >= 4.0
39 BuildRequires:  zlib-devel
40 Requires:       vpb-libs = %{version}-%{rel}
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 This is the Voicetronix voice processing board (VPB) driver software.
45
46 %description -l pl.UTF-8
47 Ten pakiet zawiera oprogramowanie sterowników kart przetwarzających
48 głos (VPB - voice processing board) firmy Voicetronix.
49
50 %package -n vpb-libs
51 Summary:        Shared VPD libraries
52 Summary(pl.UTF-8):      Biblioteki współdzielone VPD
53 License:        LGPL v2.1+
54 Group:          Libraries
55
56 %description -n vpb-libs
57 Shared VPD libraries.
58
59 %description -n vpb-libs -l pl.UTF-8
60 Biblioteki współdzielone VPD.
61
62 %package -n vpb-devel
63 Summary:        Header files for VPD libraries
64 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek VPD
65 License:        LGPL v2.1+
66 Group:          Development/Libraries
67 Requires:       vpb-libs = %{version}-%{rel}
68
69 %description -n vpb-devel
70 Header files for VPD libraries.
71
72 %description -n vpb-devel -l pl.UTF-8
73 Pliki nagłówkowe bibliotek VPD.
74
75 %package -n vpb-static
76 Summary:        Static VPD libraries
77 Summary(pl.UTF-8):      Statyczne biblioteki VPD
78 License:        LGPL v2.1+
79 Group:          Development/Libraries
80 Requires:       vpb-devel = %{version}-%{rel}
81
82 %description -n vpb-static
83 Static VPD libraries.
84
85 %description -n vpb-static -l pl.UTF-8
86 Statyczne biblioteki VPD.
87
88 %package -n kernel%{_alt_kernel}-telephony-vpb
89 Summary:        Linux kernel driver for Voicetronix Voice Processing Board (VPB)
90 Summary(pl.UTF-8):      Sterownik jądra Linuksa do kart VPB firmy Voicetronix
91 Release:        %{rel}@%{_kernel_ver_str}
92 License:        GPL v2+
93 Group:          Base/Kernel
94 Requires(post,postun):  /sbin/depmod
95 %if %{with dist_kernel}
96 %requires_releq_kernel
97 Requires(postun):       %releq_kernel
98 %endif
99
100 %description -n kernel%{_alt_kernel}-telephony-vpb
101 Linux kernel driver for Voicetronix Voice Processing Board (VPB).
102
103 %description -n kernel%{_alt_kernel}-telephony-vpb -l pl.UTF-8
104 Sterownik jądra Linuksa do kart VPB firmy Voicetronix.
105
106 %prep
107 %setup -q -n %{pname}-%{version}
108 %patch0 -p1
109 %patch1 -p1
110 %if "%{_alt_kernel}" == "%{nil}"
111 %patch2 -p1
112 %endif
113
114 %if %{without kernel}
115 %{__sed} -i -e 's,subdirs += $(srcdir)/vtcore $(srcdir)/vpb,,' src/Makefile.in
116 %endif
117 %if %{without userspace}
118 %{__sed} -i -e 's,subdirs = libtoneg libvpb utils,,' src/Makefile.in
119 %endif
120
121 %build
122 %{__aclocal}
123 %{__autoconf}
124 %if %{with userspace} && %{with static_libs}
125 install -d build-static
126 cd build-static
127 ../%configure \
128         %{?with_pri:--with-pri}
129 %{__make} -C src/libtoneg \
130         VPATH=%{_libdir}
131 %{__make} -C src/libvpb \
132         VPATH=%{_libdir}
133 cd ..
134 %endif
135 %configure \
136         %{?with_pri:--with-pri} \
137         --enable-shared
138
139 %if %{without userspace}
140 %{__make} -C src \
141         %{?with_kernel:KSRC=%{_kernelsrcdir}} \
142         VPATH=%{_libdir}
143 %else
144 %{__make} \
145         %{?with_kernel:KSRC=%{_kernelsrcdir}} \
146         VPATH=%{_libdir}
147 %endif
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151
152 %if %{without userspace}
153 %{__make} -C src install \
154         DESTDIR=$RPM_BUILD_ROOT \
155         %{?with_kernel:KSRC=%{_kernelsrcdir}}
156
157 install -d $RPM_BUILD_ROOT/etc/modprobe.d
158 install src/libvpb/blunt-axe.conf $RPM_BUILD_ROOT/etc/modprobe.d
159
160 %else
161
162 %{__make} install \
163         DESTDIR=$RPM_BUILD_ROOT \
164         %{?with_kernel:KSRC=%{_kernelsrcdir}}
165
166 # let rpm generate dependencies
167 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
168
169 # install man pages only for packaged software
170 install -d $RPM_BUILD_ROOT%{_mandir}/man1
171 install doc/vpbconf.1 $RPM_BUILD_ROOT%{_mandir}/man1
172 install doc/vpbscan.1 $RPM_BUILD_ROOT%{_mandir}/man1
173
174 %if %{with static_libs}
175 install build-static/src/{libtoneg/libtoneg.a,libvpb/libvpb.a} $RPM_BUILD_ROOT%{_libdir}
176 %endif
177 %endif
178
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   -n vpb-libs -p /sbin/ldconfig
183 %postun -n vpb-libs -p /sbin/ldconfig
184
185 %post -n kernel%{_alt_kernel}-telephony-vpb
186 %depmod %{_kernel_ver}
187
188 %postun -n kernel%{_alt_kernel}-telephony-vpb
189 %depmod %{_kernel_ver}
190
191 %if %{with userspace}
192 %files
193 %defattr(644,root,root,755)
194 %doc COPYING README README.{OpenPCI,OpenPRI,OpenSwitch12,VTCore,VpbConfig}
195 %attr(755,root,root) %{_sbindir}/vpbconf
196 %attr(755,root,root) %{_sbindir}/vpbscan
197 %{_datadir}/vpb-driver
198 %{_mandir}/man1/vpbconf.1*
199 %{_mandir}/man1/vpbscan.1*
200
201 %files -n vpb-libs
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_libdir}/libtoneg.so.*.*.*
204 %attr(755,root,root) %ghost %{_libdir}/libtoneg.so.0
205 %attr(755,root,root) %{_libdir}/libvpb.so.*.*.*
206 %attr(755,root,root) %ghost %{_libdir}/libvpb.so.0
207
208 %files -n vpb-devel
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_libdir}/libtoneg.so
211 %attr(755,root,root) %{_libdir}/libvpb.so
212 %{_includedir}/vt
213 %{_includedir}/vpbapi.h
214 %{_includedir}/vt_deprecated.h
215 %{_includedir}/vtcore_ioctl.h
216
217 %if %{with static_libs}
218 %files -n vpb-static
219 %defattr(644,root,root,755)
220 %{_libdir}/libtoneg.a
221 %{_libdir}/libvpb.a
222 %endif
223 %endif
224
225 %if %{with kernel}
226 %files -n kernel%{_alt_kernel}-telephony-vpb
227 %defattr(644,root,root,755)
228 %dir /lib/modules/%{_kernel_ver}/kernel/drivers/telephony
229 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vpb.ko*
230 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtcore.ko*
231 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenpci.ko*
232 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenswitch.ko*
233 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blunt-axe.conf
234 %endif
This page took 0.068582 seconds and 4 git commands to generate.