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