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