]> git.pld-linux.org Git - packages/vpb-driver.git/blame - vpb-driver.spec
- release 14 (by relup.sh)
[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
be01f0e5 16%define rel 14
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}
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
9a1e9700
JR
134
135%if %{without userspace}
136%{__make} -C src \
137 %{?with_kernel:KSRC=%{_kernelsrcdir}} \
138 VPATH=%{_libdir}
139%else
dbfa6bb9
JB
140%{__make} \
141 %{?with_kernel:KSRC=%{_kernelsrcdir}} \
142 VPATH=%{_libdir}
9a1e9700 143%endif
a9ca2497
JB
144
145%install
146rm -rf $RPM_BUILD_ROOT
147
9a1e9700
JR
148%if %{without userspace}
149%{__make} -C src install \
150 DESTDIR=$RPM_BUILD_ROOT \
151 %{?with_kernel:KSRC=%{_kernelsrcdir}}
152
153install -d $RPM_BUILD_ROOT/etc/modprobe.d
154install src/libvpb/blunt-axe.conf $RPM_BUILD_ROOT/etc/modprobe.d
155
156%else
157
a9ca2497 158%{__make} install \
dbfa6bb9
JB
159 DESTDIR=$RPM_BUILD_ROOT \
160 %{?with_kernel:KSRC=%{_kernelsrcdir}}
a9ca2497 161
a9ca2497
JB
162# let rpm generate dependencies
163chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib*.so*
164
165# install man pages only for packaged software
166install -d $RPM_BUILD_ROOT%{_mandir}/man1
167install doc/vpbconf.1 $RPM_BUILD_ROOT%{_mandir}/man1
168install doc/vpbscan.1 $RPM_BUILD_ROOT%{_mandir}/man1
169
170%if %{with static_libs}
171install build-static/src/{libtoneg/libtoneg.a,libvpb/libvpb.a} $RPM_BUILD_ROOT%{_libdir}
172%endif
173%endif
174
175%clean
176rm -rf $RPM_BUILD_ROOT
177
178%post -n vpb-libs -p /sbin/ldconfig
179%postun -n vpb-libs -p /sbin/ldconfig
180
181%post -n kernel%{_alt_kernel}-telephony-vpb
182%depmod %{_kernel_ver}
183
184%postun -n kernel%{_alt_kernel}-telephony-vpb
185%depmod %{_kernel_ver}
186
187%if %{with userspace}
188%files
189%defattr(644,root,root,755)
190%doc COPYING README README.{OpenPCI,OpenPRI,OpenSwitch12,VTCore,VpbConfig}
191%attr(755,root,root) %{_sbindir}/vpbconf
192%attr(755,root,root) %{_sbindir}/vpbscan
193%{_datadir}/vpb-driver
194%{_mandir}/man1/vpbconf.1*
195%{_mandir}/man1/vpbscan.1*
196
197%files -n vpb-libs
198%defattr(644,root,root,755)
199%attr(755,root,root) %{_libdir}/libtoneg.so.*.*.*
200%attr(755,root,root) %ghost %{_libdir}/libtoneg.so.0
201%attr(755,root,root) %{_libdir}/libvpb.so.*.*.*
202%attr(755,root,root) %ghost %{_libdir}/libvpb.so.0
203
204%files -n vpb-devel
205%defattr(644,root,root,755)
206%attr(755,root,root) %{_libdir}/libtoneg.so
207%attr(755,root,root) %{_libdir}/libvpb.so
208%{_includedir}/vt
209%{_includedir}/vpbapi.h
210%{_includedir}/vt_deprecated.h
211%{_includedir}/vtcore_ioctl.h
212
213%if %{with static_libs}
214%files -n vpb-static
215%defattr(644,root,root,755)
216%{_libdir}/libtoneg.a
217%{_libdir}/libvpb.a
218%endif
219%endif
220
221%if %{with kernel}
3dbbefd9 222%files -n kernel%{_alt_kernel}-telephony-vpb
a9ca2497 223%defattr(644,root,root,755)
faa79da0 224%dir /lib/modules/%{_kernel_ver}/kernel/drivers/telephony
a9ca2497
JB
225/lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vpb.ko*
226/lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtcore.ko*
227/lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenpci.ko*
228/lib/modules/%{_kernel_ver}/kernel/drivers/telephony/vtopenswitch.ko*
229%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blunt-axe.conf
230%endif
This page took 0.086798 seconds and 4 git commands to generate.