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