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