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