]>
Commit | Line | Data |
---|---|---|
84eca061 JB |
1 | # |
2 | # Conditional build | |
3 | %bcond_with hotplug # old-style (pre-udev) hotplug support | |
cb361dd9 | 4 | # |
6f6c8480 | 5 | %include /usr/lib/rpm/macros.perl |
cb361dd9 | 6 | Summary: DAHDI telephony device support |
7 | Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI | |
8 | Name: dahdi-tools | |
fc45f4e9 | 9 | Version: 2.9.0 |
d4845b0b JB |
10 | Release: 1 |
11 | License: GPL v2 | |
cb361dd9 | 12 | Group: Base/Kernel |
256e3dd0 | 13 | Source0: http://downloads.asterisk.org/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz |
fc45f4e9 | 14 | # Source0-md5: 8cccad1956d3419daf0c1771ea0504ac |
cb361dd9 | 15 | Source1: dahdi.init |
16 | Source2: dahdi.sysconfig | |
17 | Patch0: %{name}-as-needed.patch | |
6f6c8480 | 18 | Patch1: %{name}-perl-path.patch |
d4845b0b | 19 | Patch2: %{name}-includes.patch |
cb361dd9 | 20 | URL: http://www.asterisk.org/ |
58e6c841 | 21 | BuildRequires: dahdi-linux-devel >= 2.3.0 |
256e3dd0 | 22 | BuildRequires: libusb-compat-devel >= 0.1 |
cb361dd9 | 23 | BuildRequires: newt-devel |
24 | BuildRequires: perl-base | |
25 | BuildRequires: perl-tools-pod | |
6f6c8480 | 26 | BuildRequires: rpm-perlprov >= 4.1-13 |
e2e6d412 | 27 | BuildRequires: rpmbuild(macros) >= 1.379 |
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 | |
95 | Group: Base/Kernel | |
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 | |
132 | %prep | |
133 | %setup -q | |
134 | %patch0 -p1 | |
6f6c8480 | 135 | %patch1 -p1 |
d4845b0b | 136 | %patch2 -p1 |
cb361dd9 | 137 | |
138 | cat > download-logger <<'EOF' | |
139 | #!/bin/sh | |
140 | # keep log of files make wanted to download in firmware/ dir | |
141 | echo "$@" >> download.log | |
142 | EOF | |
143 | chmod a+rx download-logger | |
cb361dd9 | 144 | |
145 | %build | |
146 | %configure | |
1a3180a1 AM |
147 | %{__make} \ |
148 | CC="%{__cc}" \ | |
149 | OPTFLAGS="%{rpmcppflags} %{rpmcflags}" | |
cb361dd9 | 150 | |
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
cb361dd9 | 153 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
154 | ||
fc45f4e9 | 155 | %{__make} -j1 config install \ |
cb361dd9 | 156 | DESTDIR=$RPM_BUILD_ROOT |
fc45f4e9 | 157 | |
cb361dd9 | 158 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dahdi |
159 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dahdi | |
160 | touch $RPM_BUILD_ROOT%{_sysconfdir}/dahdi.conf | |
161 | ||
84eca061 JB |
162 | # sample configuration files - nothing enabled by default, so safe to install |
163 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/assigned-spans.conf{.sample,} | |
164 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/span-types.conf{.sample,} | |
165 | ||
166 | # old-style hotplug stuff | |
167 | %if %{without hotplug} | |
168 | %{__rm} $RPM_BUILD_ROOT/etc/hotplug/usb/xpp_* | |
169 | %endif | |
170 | # used by upstream (but not PLD) init script | |
171 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/dahdi/{init.conf,modules} | |
172 | ||
cb361dd9 | 173 | %clean |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %post init | |
177 | /sbin/chkconfig --add dahdi | |
178 | %service dahdi restart | |
179 | ||
180 | %preun init | |
181 | if [ "$1" = "0" ]; then | |
182 | %service dahdi stop | |
183 | /sbin/chkconfig --del dahdi | |
184 | fi | |
185 | ||
186 | %files | |
187 | %defattr(644,root,root,755) | |
188 | %doc README | |
189 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi.conf | |
190 | %dir %{_sysconfdir}/dahdi | |
191 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/system.conf | |
84eca061 JB |
192 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/assigned-spans.conf |
193 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/span-types.conf | |
194 | %if %{with hotplug} | |
195 | %attr(755,root,root) /etc/hotplug/usb/xpp_fxloader | |
196 | /etc/hotplug/usb/xpp_fxloader.usermap | |
197 | %endif | |
198 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/dahdi.blacklist.conf | |
199 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/dahdi.conf | |
d4845b0b | 200 | %attr(755,root,root) %{_sbindir}/astribank_* |
bfab6dda JB |
201 | %attr(755,root,root) %{_sbindir}/dahdi_cfg |
202 | %attr(755,root,root) %{_sbindir}/dahdi_maint | |
203 | %attr(755,root,root) %{_sbindir}/dahdi_monitor | |
204 | %attr(755,root,root) %{_sbindir}/dahdi_scan | |
205 | %attr(755,root,root) %{_sbindir}/dahdi_speed | |
206 | %attr(755,root,root) %{_sbindir}/dahdi_test | |
207 | %attr(755,root,root) %{_sbindir}/dahdi_tool | |
fc45f4e9 JR |
208 | %attr(755,root,root) %{_sbindir}/dahdi_span_assignments |
209 | %attr(755,root,root) %{_sbindir}/dahdi_span_types | |
210 | %attr(755,root,root) %{_sbindir}/dahdi_waitfor_span_assignments | |
d4845b0b | 211 | %attr(755,root,root) %{_sbindir}/fxotune |
d4845b0b | 212 | %attr(755,root,root) %{_sbindir}/sethdlc |
d4845b0b JB |
213 | %attr(755,root,root) %{_libdir}/libtonezone.so.1.* |
214 | %attr(755,root,root) %ghost %{_libdir}/libtonezone.so.1 | |
215 | %attr(755,root,root) %{_libdir}/libtonezone.so.2.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libtonezone.so.2 | |
cb361dd9 | 217 | %{_datadir}/dahdi |
d4845b0b | 218 | %{_mandir}/man8/astribank_*.8* |
bfab6dda JB |
219 | %{_mandir}/man8/dahdi_cfg.8* |
220 | %{_mandir}/man8/dahdi_maint.8* | |
221 | %{_mandir}/man8/dahdi_monitor.8* | |
222 | %{_mandir}/man8/dahdi_scan.8* | |
223 | %{_mandir}/man8/dahdi_test.8* | |
224 | %{_mandir}/man8/dahdi_tool.8* | |
d4845b0b | 225 | %{_mandir}/man8/fxotune.8* |
fc45f4e9 JR |
226 | %{_mandir}/man8/dahdi_span_assignments.8* |
227 | %{_mandir}/man8/dahdi_span_types.8* | |
228 | %{_mandir}/man8/dahdi_waitfor_span_assignments.8* | |
cb361dd9 | 229 | |
230 | %files devel | |
231 | %defattr(644,root,root,755) | |
d4845b0b JB |
232 | %attr(755,root,root) %{_libdir}/libtonezone.so |
233 | %{_includedir}/dahdi/tonezone.h | |
cb361dd9 | 234 | |
235 | %files static | |
236 | %defattr(644,root,root,755) | |
d4845b0b | 237 | %{_libdir}/libtonezone.a |
cb361dd9 | 238 | |
bfab6dda JB |
239 | %files perl |
240 | %defattr(644,root,root,755) | |
241 | %attr(755,root,root) %{_sbindir}/dahdi_genconf | |
242 | %attr(755,root,root) %{_sbindir}/dahdi_hardware | |
243 | %attr(755,root,root) %{_sbindir}/dahdi_registration | |
244 | %attr(755,root,root) %{_sbindir}/lsdahdi | |
245 | %attr(755,root,root) %{_sbindir}/twinstar | |
246 | %attr(755,root,root) %{_sbindir}/xpp_blink | |
247 | %attr(755,root,root) %{_sbindir}/xpp_sync | |
84eca061 JB |
248 | # for dahdi_genconf |
249 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/genconf_parameters | |
bfab6dda JB |
250 | %{_mandir}/man8/dahdi_genconf.8* |
251 | %{_mandir}/man8/dahdi_hardware.8* | |
252 | %{_mandir}/man8/dahdi_registration.8* | |
253 | %{_mandir}/man8/lsdahdi.8* | |
254 | %{_mandir}/man8/twinstar.8* | |
255 | %{_mandir}/man8/xpp_blink.8* | |
256 | %{_mandir}/man8/xpp_sync.8* | |
257 | ||
d4845b0b | 258 | %files init |
cb361dd9 | 259 | %defattr(644,root,root,755) |
d4845b0b JB |
260 | %attr(754,root,root) /etc/rc.d/init.d/dahdi |
261 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dahdi | |
cb361dd9 | 262 | |
fc45f4e9 JR |
263 | %files udev |
264 | %defattr(644,root,root,755) | |
265 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/dahdi.rules | |
266 | %config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/xpp.rules | |
267 | ||
84eca061 JB |
268 | %files -n bash-completion-dahdi |
269 | %defattr(644,root,root,755) | |
270 | /etc/bash_completion.d/dahdi | |
271 | ||
cb361dd9 | 272 | %files -n perl-Dahdi |
273 | %defattr(644,root,root,755) | |
6f6c8480 | 274 | %{perl_vendorlib}/Dahdi |
275 | %{perl_vendorlib}/Dahdi.pm |