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