]> git.pld-linux.org Git - packages/vpb-driver.git/blame - vpb-driver.spec
- rebuild for kernel-3.9.11-1
[packages/vpb-driver.git] / vpb-driver.spec
CommitLineData
a9ca2497
JB
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
faa79da0 15
c3adf5be 16%define rel 7
faa79da0 17%define pname vpb-driver
a9ca2497
JB
18Summary: Voicetronix voice processing board (VPB) driver software
19Summary(pl.UTF-8): Oprogramowanie sterowników dla kart przetwarzających głos (VPB) Voicetronix
faa79da0 20Name: %{pname}%{_alt_kernel}
aa4d7715 21Version: 4.2.56
a9ca2497
JB
22Release: %{rel}
23License: LGPL v2.1+ (libraries), GPL v2+ (libpri library, kernel module)
24Group: Libraries
faa79da0 25Source0: http://www.voicetronix.com.au/Downloads/vpb-driver-4.x/%{pname}-%{version}.tar.gz
aa4d7715 26# Source0-md5: aa7442b5b98a566fe67544115d83e20a
faa79da0
JR
27Patch0: %{pname}-make.patch
28Patch1: %{pname}-kernel.patch
ee8d576b 29Patch2: linux-3.8.patch
a9ca2497
JB
30URL: http://www.voicetronix.com.au/downloads.htm#linux
31%if %{with dist_kernel}
32BuildRequires: kernel%{_alt_kernel}-module-build
33%endif
34BuildRequires: autoconf >= 2.59
35BuildRequires: libstdc++-devel
36BuildRequires: pciutils-devel
37BuildRequires: rpmbuild(macros) >= 1.379
dbfa6bb9 38BuildRequires: sed >= 4.0
a9ca2497
JB
39BuildRequires: zlib-devel
40Requires: vpb-libs = %{version}-%{rel}
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44This is the Voicetronix voice processing board (VPB) driver software.
45
46%description -l pl.UTF-8
47Ten pakiet zawiera oprogramowanie sterowników kart przetwarzających
48głos (VPB - voice processing board) firmy Voicetronix.
49
50%package -n vpb-libs
51Summary: Shared VPD libraries
52Summary(pl.UTF-8): Biblioteki współdzielone VPD
53License: LGPL v2.1+
54Group: Libraries
55
56%description -n vpb-libs
57Shared VPD libraries.
58
59%description -n vpb-libs -l pl.UTF-8
60Biblioteki współdzielone VPD.
61
62%package -n vpb-devel
63Summary: Header files for VPD libraries
64Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VPD
65License: LGPL v2.1+
66Group: Development/Libraries
67Requires: vpb-libs = %{version}-%{rel}
68
69%description -n vpb-devel
70Header files for VPD libraries.
71
72%description -n vpb-devel -l pl.UTF-8
73Pliki nagłówkowe bibliotek VPD.
74
75%package -n vpb-static
76Summary: Static VPD libraries
77Summary(pl.UTF-8): Statyczne biblioteki VPD
78License: LGPL v2.1+
79Group: Development/Libraries
80Requires: vpb-devel = %{version}-%{rel}
81
82%description -n vpb-static
83Static VPD libraries.
84
85%description -n vpb-static -l pl.UTF-8
86Statyczne biblioteki VPD.
87
88%package -n kernel%{_alt_kernel}-telephony-vpb
89Summary: Linux kernel driver for Voicetronix Voice Processing Board (VPB)
90Summary(pl.UTF-8): Sterownik jądra Linuksa do kart VPB firmy Voicetronix
91Release: %{rel}@%{_kernel_ver_str}
92License: GPL v2+
93Group: Base/Kernel
94Requires(post,postun): /sbin/depmod
95%if %{with dist_kernel}
96%requires_releq_kernel
97Requires(postun): %releq_kernel
98%endif
99
100%description -n kernel%{_alt_kernel}-telephony-vpb
101Linux kernel driver for Voicetronix Voice Processing Board (VPB).
102
103%description -n kernel%{_alt_kernel}-telephony-vpb -l pl.UTF-8
104Sterownik jądra Linuksa do kart VPB firmy Voicetronix.
105
106%prep
faa79da0 107%setup -q -n %{pname}-%{version}
a9ca2497 108%patch0 -p1
dbfa6bb9 109%patch1 -p1
ee8d576b
JR
110%if "%{_alt_kernel}" == "%{nil}"
111%patch2 -p1
112%endif
dbfa6bb9
JB
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
a9ca2497
JB
120
121%build
122%{__aclocal}
123%{__autoconf}
124%if %{with userspace} && %{with static_libs}
125install -d build-static
126cd build-static
127../%configure \
128 %{?with_pri:--with-pri}
dbfa6bb9
JB
129%{__make} -C src/libtoneg \
130 VPATH=%{_libdir}
131%{__make} -C src/libvpb \
132 VPATH=%{_libdir}
a9ca2497
JB
133cd ..
134%endif
135%configure \
136 %{?with_pri:--with-pri} \
137 --enable-shared
9a1e9700
JR
138
139%if %{without userspace}
140%{__make} -C src \
141 %{?with_kernel:KSRC=%{_kernelsrcdir}} \
142 VPATH=%{_libdir}
143%else
dbfa6bb9
JB
144%{__make} \
145 %{?with_kernel:KSRC=%{_kernelsrcdir}} \
146 VPATH=%{_libdir}
9a1e9700 147%endif
a9ca2497
JB
148
149%install
150rm -rf $RPM_BUILD_ROOT
151
9a1e9700
JR
152%if %{without userspace}
153%{__make} -C src install \
154 DESTDIR=$RPM_BUILD_ROOT \
155 %{?with_kernel:KSRC=%{_kernelsrcdir}}
156
157install -d $RPM_BUILD_ROOT/etc/modprobe.d
158install src/libvpb/blunt-axe.conf $RPM_BUILD_ROOT/etc/modprobe.d
159
160%else
161
a9ca2497 162%{__make} install \
dbfa6bb9
JB
163 DESTDIR=$RPM_BUILD_ROOT \
164 %{?with_kernel:KSRC=%{_kernelsrcdir}}
a9ca2497 165
a9ca2497
JB
166# let rpm generate dependencies
167chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
168
169# install man pages only for packaged software
170install -d $RPM_BUILD_ROOT%{_mandir}/man1
171install doc/vpbconf.1 $RPM_BUILD_ROOT%{_mandir}/man1
172install doc/vpbscan.1 $RPM_BUILD_ROOT%{_mandir}/man1
173
174%if %{with static_libs}
175install build-static/src/{libtoneg/libtoneg.a,libvpb/libvpb.a} $RPM_BUILD_ROOT%{_libdir}
176%endif
177%endif
178
179%clean
180rm -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}
3dbbefd9 226%files -n kernel%{_alt_kernel}-telephony-vpb
a9ca2497 227%defattr(644,root,root,755)
faa79da0 228%dir /lib/modules/%{_kernel_ver}/kernel/drivers/telephony
a9ca2497
JB
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.129874 seconds and 4 git commands to generate.