]>
Commit | Line | Data |
---|---|---|
ae9a054b | 1 | # TODO: package /etc/dracut.conf.d/50-dahdi.conf |
84eca061 JB |
2 | # |
3 | # Conditional build | |
0160d02c | 4 | %bcond_without ppp # pppd plugin |
cb361dd9 | 5 | # |
cb361dd9 | 6 | Summary: DAHDI telephony device support |
7 | Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI | |
8 | Name: dahdi-tools | |
11fe800f | 9 | Version: 3.3.0 |
d18464a5 | 10 | Release: 1 |
d4845b0b | 11 | License: GPL v2 |
a1dd5bc6 | 12 | Group: Applications/System |
256e3dd0 | 13 | Source0: http://downloads.asterisk.org/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz |
11fe800f | 14 | # Source0-md5: 237e35e7fc5def7d339b088656a7b983 |
cb361dd9 | 15 | Source1: dahdi.init |
16 | Source2: dahdi.sysconfig | |
a1dd5bc6 | 17 | Patch0: %{name}-includes.patch |
11fe800f | 18 | Patch1: %{name}-pppd.patch |
cb361dd9 | 19 | URL: http://www.asterisk.org/ |
ae9a054b JB |
20 | BuildRequires: asciidoc |
21 | BuildRequires: autoconf >= 2.59 | |
22 | BuildRequires: automake | |
58e6c841 | 23 | BuildRequires: dahdi-linux-devel >= 2.3.0 |
a1dd5bc6 | 24 | BuildRequires: libpcap-devel |
ae9a054b | 25 | BuildRequires: libtool |
a1dd5bc6 | 26 | BuildRequires: libusb-devel >= 1.0.9 |
cb361dd9 | 27 | BuildRequires: newt-devel |
28 | BuildRequires: perl-base | |
29 | BuildRequires: perl-tools-pod | |
d88cb428 | 30 | BuildRequires: pkgconfig |
11fe800f | 31 | %{?with_ppp:BuildRequires: ppp-plugin-devel >= 3:2.5.0} |
6f6c8480 | 32 | BuildRequires: rpm-perlprov >= 4.1-13 |
ae9a054b | 33 | BuildRequires: rpmbuild(macros) >= 1.745 |
a1dd5bc6 | 34 | Requires: libusb >= 1.0.9 |
11fe800f JB |
35 | Obsoletes: dahdi-tools-utils < 2.6.1 |
36 | Obsoletes: zaptel < 2 | |
37 | Obsoletes: zaptel-utils < 2 | |
cb361dd9 | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
cb361dd9 | 40 | %description |
41 | DAHDI telephony device driver. | |
42 | ||
43 | %description -l pl.UTF-8 | |
44 | Sterownik do urządzeń telefonicznych DAHDI. | |
45 | ||
46 | %package devel | |
47 | Summary: DAHDI development headers | |
48 | Summary(pl.UTF-8): Pliki nagłówkowe DAHDI | |
49 | Group: Development/Libraries | |
d4845b0b JB |
50 | Requires: %{name} = %{version}-%{release} |
51 | Requires: dahdi-linux-devel | |
11fe800f | 52 | Obsoletes: zaptel-devel < 2 |
cb361dd9 | 53 | |
54 | %description devel | |
55 | DAHDI development headers. | |
56 | ||
57 | %description devel -l pl.UTF-8 | |
58 | Pliki nagłówkowe DAHDI. | |
59 | ||
60 | %package static | |
61 | Summary: DAHDI static library | |
62 | Summary(pl.UTF-8): Biblioteka statyczna DAHDI | |
63 | Group: Development/Libraries | |
d4845b0b | 64 | Requires: %{name}-devel = %{version}-%{release} |
cb361dd9 | 65 | |
66 | %description static | |
67 | DAHDI static library. | |
68 | ||
69 | %description static -l pl.UTF-8 | |
70 | Biblioteka statyczna DAHDI. | |
71 | ||
bfab6dda JB |
72 | %package perl |
73 | Summary: DAHDI utility programs written in Perl | |
74 | Summary(pl.UTF-8): Programy narzędziowe DAHDI napisane w Perlu | |
75 | Group: Applications/Communications | |
76 | Requires: perl-Dahdi = %{version}-%{release} | |
77 | ||
78 | %description perl | |
79 | DAHDI utility programs written in Perl. | |
80 | ||
81 | %description perl -l pl.UTF-8 | |
82 | Programy narzędziowe DAHDI napisane w Perlu. | |
83 | ||
cb361dd9 | 84 | %package init |
85 | Summary: DAHDI init scripts | |
86 | Summary(pl.UTF-8): Skrypty inicjalizujące DAHDI | |
87 | Group: Applications/Communications | |
88 | Requires(post,preun): /sbin/chkconfig | |
d4845b0b | 89 | Requires: %{name} = %{version}-%{release} |
cb361dd9 | 90 | Requires: rc-scripts |
11fe800f | 91 | Obsoletes: zaptel-init < 2 |
cb361dd9 | 92 | |
93 | %description init | |
94 | DAHDI boot-time initialization. | |
95 | ||
96 | %description init -l pl.UTF-8 | |
97 | Inicjalizacja DAHDI w czasie startu systemu. | |
98 | ||
55c2ee1c JR |
99 | %package -n dracut-dahdi-tools |
100 | Summary: dracut rules for DAHDI kernel modules | |
101 | Summary(pl.UTF-8): Reguły dracut dla modułów jądra Linuksa dla DAHDI | |
102 | Group: Applications/System | |
103 | Requires: %{name} >= 2.2.0 | |
104 | Requires: dracut | |
105 | ||
106 | %description -n dracut-dahdi-tools | |
107 | dracut rules for DAHDI kernel modules. | |
108 | ||
109 | %description -n dracut-dahdi-tools -l pl.UTF-8 | |
110 | Reguły dracut dla modułów jądra Linuksa dla DAHDI. | |
111 | ||
112 | %package -n udev-dahdi-tools | |
fc45f4e9 JR |
113 | Summary: udev rules for DAHDI kernel modules |
114 | Summary(pl.UTF-8): Reguły udev dla modułów jądra Linuksa dla DAHDI | |
a1dd5bc6 | 115 | Group: Applications/System |
fc45f4e9 | 116 | Obsoletes: dahdi-linux-udev < 2.9.0 |
55c2ee1c | 117 | Obsoletes: dahdi-tools-udev < 3.1.0 |
fc45f4e9 JR |
118 | Requires: %{name} >= 2.2.0 |
119 | Requires: udev-core | |
120 | ||
55c2ee1c | 121 | %description -n udev-dahdi-tools |
fc45f4e9 JR |
122 | udev rules for DAHDI kernel modules. |
123 | ||
55c2ee1c | 124 | %description -n udev-dahdi-tools -l pl.UTF-8 |
fc45f4e9 JR |
125 | Reguły udev dla modułów jądra Linuksa dla DAHDI. |
126 | ||
84eca061 JB |
127 | %package -n bash-completion-dahdi |
128 | Summary: Bash completion for DAHDI commands | |
129 | Summary(pl.UTF-8): Bashowe dopełnianie składni dla poleceń DAHDI | |
130 | Group: Applications/Shells | |
131 | Requires: %{name} = %{version}-%{release} | |
132 | Requires: bash-completion | |
133 | ||
134 | %description -n bash-completion-dahdi | |
135 | Bash completion for DAHDI commands. | |
136 | ||
137 | %description -n bash-completion-dahdi -l pl.UTF-8 | |
138 | Bashowe dopełnianie składni dla poleceń DAHDI. | |
139 | ||
cb361dd9 | 140 | %package -n perl-Dahdi |
141 | Summary: Perl interface to DAHDI | |
d4845b0b | 142 | Summary(pl.UTF-8): Perlowy interfejs do DAHDI |
cb361dd9 | 143 | Group: Development/Languages/Perl |
bfab6dda | 144 | # needs dahdi_scan |
d4845b0b | 145 | Requires: %{name} = %{version}-%{release} |
cb361dd9 | 146 | |
147 | %description -n perl-Dahdi | |
148 | Perl inferface to DAHDI. | |
149 | ||
150 | %description -n perl-Dahdi -l pl.UTF-8 | |
d4845b0b | 151 | Perlowy interfejs do DAHDI. |
cb361dd9 | 152 | |
0160d02c JB |
153 | %package -n ppp-plugin-dahdi |
154 | Summary: DAHDI plugin for PPP daemon | |
155 | Summary(pl.UTF-8): Wtyczka DAHDI dla demona PPP | |
156 | Group: Libraries | |
11fe800f | 157 | Requires: ppp >= 3:2.5.0 |
0160d02c JB |
158 | |
159 | %description -n ppp-plugin-dahdi | |
160 | DAHDI plugin for PPP daemon. | |
161 | ||
162 | %description -n ppp-plugin-dahdi -l pl.UTF-8 | |
163 | Wtyczka DAHDI dla demona PPP. | |
164 | ||
cb361dd9 | 165 | %prep |
166 | %setup -q | |
167 | %patch0 -p1 | |
55c2ee1c | 168 | %patch1 -p1 |
cb361dd9 | 169 | |
170 | cat > download-logger <<'EOF' | |
171 | #!/bin/sh | |
172 | # keep log of files make wanted to download in firmware/ dir | |
173 | echo "$@" >> download.log | |
174 | EOF | |
175 | chmod a+rx download-logger | |
cb361dd9 | 176 | |
177 | %build | |
ae9a054b JB |
178 | %{__libtoolize} |
179 | %{__aclocal} -I m4 | |
180 | %{__autoconf} | |
181 | %{__autoheader} | |
182 | %{__automake} | |
a1dd5bc6 JB |
183 | %configure \ |
184 | --disable-silent-rules \ | |
185 | --with-perllib=%{perl_vendorlib} \ | |
186 | %{!?with_ppp:--without-ppp} | |
cb361dd9 | 187 | |
a1dd5bc6 | 188 | %{__make} |
0160d02c | 189 | |
cb361dd9 | 190 | %install |
191 | rm -rf $RPM_BUILD_ROOT | |
cb361dd9 | 192 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
193 | ||
a1dd5bc6 | 194 | %{__make} -j1 install install-config \ |
0160d02c | 195 | DESTDIR=$RPM_BUILD_ROOT \ |
ae9a054b JB |
196 | PPPD_VERSION=plugins \ |
197 | dracutconfdir=/etc/dracut.conf.d | |
94c20e10 | 198 | |
a1dd5bc6 JB |
199 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libtonezone.la |
200 | %if %{with ppp} | |
201 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/dahdi.{la,a} | |
0160d02c JB |
202 | %endif |
203 | ||
cb361dd9 | 204 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dahdi |
205 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dahdi | |
206 | touch $RPM_BUILD_ROOT%{_sysconfdir}/dahdi.conf | |
207 | ||
84eca061 JB |
208 | # sample configuration files - nothing enabled by default, so safe to install |
209 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/assigned-spans.conf{.sample,} | |
210 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/span-types.conf{.sample,} | |
a1dd5bc6 | 211 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/system.conf{.sample,} |
84eca061 | 212 | |
84eca061 | 213 | # used by upstream (but not PLD) init script |
a1dd5bc6 | 214 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/{init.conf,modules.sample} |
84eca061 | 215 | |
cb361dd9 | 216 | %clean |
217 | rm -rf $RPM_BUILD_ROOT | |
218 | ||
219 | %post init | |
220 | /sbin/chkconfig --add dahdi | |
221 | %service dahdi restart | |
222 | ||
223 | %preun init | |
224 | if [ "$1" = "0" ]; then | |
225 | %service dahdi stop | |
226 | /sbin/chkconfig --del dahdi | |
227 | fi | |
228 | ||
229 | %files | |
230 | %defattr(644,root,root,755) | |
231 | %doc README | |
232 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi.conf | |
233 | %dir %{_sysconfdir}/dahdi | |
234 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/system.conf | |
84eca061 JB |
235 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/assigned-spans.conf |
236 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/span-types.conf | |
a1dd5bc6 | 237 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/dahdi-blacklist.conf |
84eca061 | 238 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/dahdi.conf |
d4845b0b | 239 | %attr(755,root,root) %{_sbindir}/astribank_* |
bfab6dda JB |
240 | %attr(755,root,root) %{_sbindir}/dahdi_cfg |
241 | %attr(755,root,root) %{_sbindir}/dahdi_maint | |
242 | %attr(755,root,root) %{_sbindir}/dahdi_monitor | |
243 | %attr(755,root,root) %{_sbindir}/dahdi_scan | |
244 | %attr(755,root,root) %{_sbindir}/dahdi_speed | |
245 | %attr(755,root,root) %{_sbindir}/dahdi_test | |
246 | %attr(755,root,root) %{_sbindir}/dahdi_tool | |
fc45f4e9 JR |
247 | %attr(755,root,root) %{_sbindir}/dahdi_span_assignments |
248 | %attr(755,root,root) %{_sbindir}/dahdi_span_types | |
249 | %attr(755,root,root) %{_sbindir}/dahdi_waitfor_span_assignments | |
d4845b0b | 250 | %attr(755,root,root) %{_sbindir}/fxotune |
d4845b0b | 251 | %attr(755,root,root) %{_sbindir}/sethdlc |
d4845b0b JB |
252 | %attr(755,root,root) %{_libdir}/libtonezone.so.2.* |
253 | %attr(755,root,root) %ghost %{_libdir}/libtonezone.so.2 | |
cb361dd9 | 254 | %{_datadir}/dahdi |
d4845b0b | 255 | %{_mandir}/man8/astribank_*.8* |
bfab6dda JB |
256 | %{_mandir}/man8/dahdi_cfg.8* |
257 | %{_mandir}/man8/dahdi_maint.8* | |
258 | %{_mandir}/man8/dahdi_monitor.8* | |
259 | %{_mandir}/man8/dahdi_scan.8* | |
fc45f4e9 JR |
260 | %{_mandir}/man8/dahdi_span_assignments.8* |
261 | %{_mandir}/man8/dahdi_span_types.8* | |
a1dd5bc6 JB |
262 | %{_mandir}/man8/dahdi_test.8* |
263 | %{_mandir}/man8/dahdi_tool.8* | |
fc45f4e9 | 264 | %{_mandir}/man8/dahdi_waitfor_span_assignments.8* |
a1dd5bc6 | 265 | %{_mandir}/man8/fxotune.8* |
cb361dd9 | 266 | |
267 | %files devel | |
268 | %defattr(644,root,root,755) | |
d4845b0b JB |
269 | %attr(755,root,root) %{_libdir}/libtonezone.so |
270 | %{_includedir}/dahdi/tonezone.h | |
cb361dd9 | 271 | |
272 | %files static | |
273 | %defattr(644,root,root,755) | |
d4845b0b | 274 | %{_libdir}/libtonezone.a |
cb361dd9 | 275 | |
bfab6dda JB |
276 | %files perl |
277 | %defattr(644,root,root,755) | |
278 | %attr(755,root,root) %{_sbindir}/dahdi_genconf | |
279 | %attr(755,root,root) %{_sbindir}/dahdi_hardware | |
280 | %attr(755,root,root) %{_sbindir}/dahdi_registration | |
281 | %attr(755,root,root) %{_sbindir}/lsdahdi | |
282 | %attr(755,root,root) %{_sbindir}/twinstar | |
283 | %attr(755,root,root) %{_sbindir}/xpp_blink | |
284 | %attr(755,root,root) %{_sbindir}/xpp_sync | |
84eca061 JB |
285 | # for dahdi_genconf |
286 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/genconf_parameters | |
bfab6dda JB |
287 | %{_mandir}/man8/dahdi_genconf.8* |
288 | %{_mandir}/man8/dahdi_hardware.8* | |
289 | %{_mandir}/man8/dahdi_registration.8* | |
290 | %{_mandir}/man8/lsdahdi.8* | |
291 | %{_mandir}/man8/twinstar.8* | |
292 | %{_mandir}/man8/xpp_blink.8* | |
293 | %{_mandir}/man8/xpp_sync.8* | |
294 | ||
d4845b0b | 295 | %files init |
cb361dd9 | 296 | %defattr(644,root,root,755) |
d4845b0b JB |
297 | %attr(754,root,root) /etc/rc.d/init.d/dahdi |
298 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dahdi | |
cb361dd9 | 299 | |
55c2ee1c | 300 | %files -n udev-dahdi-tools |
fc45f4e9 JR |
301 | %defattr(644,root,root,755) |
302 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/dahdi.rules | |
303 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xpp.rules | |
304 | ||
55c2ee1c JR |
305 | %files -n dracut-dahdi-tools |
306 | %defattr(644,root,root,755) | |
307 | /etc/dracut.conf.d/50-dahdi.conf | |
308 | ||
84eca061 JB |
309 | %files -n bash-completion-dahdi |
310 | %defattr(644,root,root,755) | |
311 | /etc/bash_completion.d/dahdi | |
312 | ||
cb361dd9 | 313 | %files -n perl-Dahdi |
314 | %defattr(644,root,root,755) | |
6f6c8480 | 315 | %{perl_vendorlib}/Dahdi |
316 | %{perl_vendorlib}/Dahdi.pm | |
0160d02c JB |
317 | |
318 | %if %{with ppp} | |
319 | %files -n ppp-plugin-dahdi | |
320 | %defattr(644,root,root,755) | |
321 | %attr(755,root,root) %{_libdir}/pppd/plugins/dahdi.so | |
322 | %endif |