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