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