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)
9 %if "%{_alt_kernel}" != "%{nil}"
10 %undefine with_userspace
13 %undefine with_dist_kernel
15 Summary: Voicetronix voice processing board (VPB) driver software
16 Summary(pl.UTF-8): Oprogramowanie sterowników dla kart przetwarzających głos (VPB) Voicetronix
21 License: LGPL v2.1+ (libraries), GPL v2+ (libpri library, kernel module)
23 Source0: http://www.voicetronix.com.au/Downloads/vpb-driver-4.x/%{name}-%{version}.tar.gz
24 # Source0-md5: d014a29043334923e0976a9273627b63
25 Patch0: %{name}-make.patch
26 Patch1: %{name}-kernel.patch
27 URL: http://www.voicetronix.com.au/downloads.htm#linux
28 %if %{with dist_kernel}
29 BuildRequires: kernel%{_alt_kernel}-module-build
31 BuildRequires: autoconf >= 2.59
32 BuildRequires: libstdc++-devel
33 BuildRequires: pciutils-devel
34 BuildRequires: rpmbuild(macros) >= 1.379
35 BuildRequires: sed >= 4.0
36 BuildRequires: zlib-devel
37 Requires: vpb-libs = %{version}-%{rel}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 This is the Voicetronix voice processing board (VPB) driver software.
43 %description -l pl.UTF-8
44 Ten pakiet zawiera oprogramowanie sterowników kart przetwarzających
45 głos (VPB - voice processing board) firmy Voicetronix.
48 Summary: Shared VPD libraries
49 Summary(pl.UTF-8): Biblioteki współdzielone VPD
53 %description -n vpb-libs
56 %description -n vpb-libs -l pl.UTF-8
57 Biblioteki współdzielone VPD.
60 Summary: Header files for VPD libraries
61 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VPD
63 Group: Development/Libraries
64 Requires: vpb-libs = %{version}-%{rel}
66 %description -n vpb-devel
67 Header files for VPD libraries.
69 %description -n vpb-devel -l pl.UTF-8
70 Pliki nagłówkowe bibliotek VPD.
72 %package -n vpb-static
73 Summary: Static VPD libraries
74 Summary(pl.UTF-8): Statyczne biblioteki VPD
76 Group: Development/Libraries
77 Requires: vpb-devel = %{version}-%{rel}
79 %description -n vpb-static
82 %description -n vpb-static -l pl.UTF-8
83 Statyczne biblioteki VPD.
85 %package -n kernel%{_alt_kernel}-telephony-vpb
86 Summary: Linux kernel driver for Voicetronix Voice Processing Board (VPB)
87 Summary(pl.UTF-8): Sterownik jądra Linuksa do kart VPB firmy Voicetronix
88 Release: %{rel}@%{_kernel_ver_str}
91 Requires(post,postun): /sbin/depmod
92 %if %{with dist_kernel}
93 %requires_releq_kernel
94 Requires(postun): %releq_kernel
97 %description -n kernel%{_alt_kernel}-telephony-vpb
98 Linux kernel driver for Voicetronix Voice Processing Board (VPB).
100 %description -n kernel%{_alt_kernel}-telephony-vpb -l pl.UTF-8
101 Sterownik jądra Linuksa do kart VPB firmy Voicetronix.
108 %if %{without kernel}
109 %{__sed} -i -e 's,subdirs += $(srcdir)/vtcore $(srcdir)/vpb,,' src/Makefile.in
111 %if %{without userspace}
112 %{__sed} -i -e 's,subdirs = libtoneg libvpb utils,,' src/Makefile.in
118 %if %{with userspace} && %{with static_libs}
119 install -d build-static
122 %{?with_pri:--with-pri}
123 %{__make} -C src/libtoneg \
125 %{__make} -C src/libvpb \
130 %{?with_pri:--with-pri} \
133 %{?with_kernel:KSRC=%{_kernelsrcdir}} \
137 rm -rf $RPM_BUILD_ROOT
140 DESTDIR=$RPM_BUILD_ROOT \
141 %{?with_kernel:KSRC=%{_kernelsrcdir}}
143 %if %{with userspace}
144 # let rpm generate dependencies
145 chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
147 # install man pages only for packaged software
148 install -d $RPM_BUILD_ROOT%{_mandir}/man1
149 install doc/vpbconf.1 $RPM_BUILD_ROOT%{_mandir}/man1
150 install doc/vpbscan.1 $RPM_BUILD_ROOT%{_mandir}/man1
152 %if %{with static_libs}
153 install build-static/src/{libtoneg/libtoneg.a,libvpb/libvpb.a} $RPM_BUILD_ROOT%{_libdir}
158 rm -rf $RPM_BUILD_ROOT
160 %post -n vpb-libs -p /sbin/ldconfig
161 %postun -n vpb-libs -p /sbin/ldconfig
163 %post -n kernel%{_alt_kernel}-telephony-vpb
164 %depmod %{_kernel_ver}
166 %postun -n kernel%{_alt_kernel}-telephony-vpb
167 %depmod %{_kernel_ver}
169 %if %{with userspace}
171 %defattr(644,root,root,755)
172 %doc COPYING README README.{OpenPCI,OpenPRI,OpenSwitch12,VTCore,VpbConfig}
173 %attr(755,root,root) %{_sbindir}/vpbconf
174 %attr(755,root,root) %{_sbindir}/vpbscan
175 %{_datadir}/vpb-driver
176 %{_mandir}/man1/vpbconf.1*
177 %{_mandir}/man1/vpbscan.1*
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_libdir}/libtoneg.so.*.*.*
182 %attr(755,root,root) %ghost %{_libdir}/libtoneg.so.0
183 %attr(755,root,root) %{_libdir}/libvpb.so.*.*.*
184 %attr(755,root,root) %ghost %{_libdir}/libvpb.so.0
187 %defattr(644,root,root,755)
188 %attr(755,root,root) %{_libdir}/libtoneg.so
189 %attr(755,root,root) %{_libdir}/libvpb.so
191 %{_includedir}/vpbapi.h
192 %{_includedir}/vt_deprecated.h
193 %{_includedir}/vtcore_ioctl.h
195 %if %{with static_libs}
197 %defattr(644,root,root,755)
198 %{_libdir}/libtoneg.a
204 %files -n kernel-telephony-vpb
205 %defattr(644,root,root,755)
206 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vpb.ko*
207 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtcore.ko*
208 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenpci.ko*
209 /lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenswitch.ko*
210 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blunt-axe.conf