]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build | |
3 | %bcond_with hotplug # old-style (pre-udev) hotplug support | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | Summary: DAHDI telephony device support | |
7 | Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI | |
8 | Name: dahdi-tools | |
9 | Version: 2.9.0.1 | |
10 | Release: 1 | |
11 | License: GPL v2 | |
12 | Group: Base/Kernel | |
13 | Source0: http://downloads.asterisk.org/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: ac17ca5b31eef8fd866e40c1e14363d9 | |
15 | Source1: dahdi.init | |
16 | Source2: dahdi.sysconfig | |
17 | Patch0: %{name}-as-needed.patch | |
18 | Patch1: %{name}-perl-path.patch | |
19 | Patch2: %{name}-includes.patch | |
20 | URL: http://www.asterisk.org/ | |
21 | BuildRequires: dahdi-linux-devel >= 2.3.0 | |
22 | BuildRequires: libusb-compat-devel >= 0.1 | |
23 | BuildRequires: newt-devel | |
24 | BuildRequires: perl-base | |
25 | BuildRequires: perl-tools-pod | |
26 | BuildRequires: rpm-perlprov >= 4.1-13 | |
27 | BuildRequires: rpmbuild(macros) >= 1.379 | |
28 | Obsoletes: dahdi-tools-utils | |
29 | Obsoletes: zaptel | |
30 | Obsoletes: zaptel-utils | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
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 | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: dahdi-linux-devel | |
45 | Obsoletes: zaptel-devel | |
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 | |
57 | Requires: %{name}-devel = %{version}-%{release} | |
58 | ||
59 | %description static | |
60 | DAHDI static library. | |
61 | ||
62 | %description static -l pl.UTF-8 | |
63 | Biblioteka statyczna DAHDI. | |
64 | ||
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 | ||
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 | |
82 | Requires: %{name} = %{version}-%{release} | |
83 | Requires: rc-scripts | |
84 | Obsoletes: zaptel-init | |
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 | ||
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 | ||
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 | ||
119 | %package -n perl-Dahdi | |
120 | Summary: Perl interface to DAHDI | |
121 | Summary(pl.UTF-8): Perlowy interfejs do DAHDI | |
122 | Group: Development/Languages/Perl | |
123 | # needs dahdi_scan | |
124 | Requires: %{name} = %{version}-%{release} | |
125 | ||
126 | %description -n perl-Dahdi | |
127 | Perl inferface to DAHDI. | |
128 | ||
129 | %description -n perl-Dahdi -l pl.UTF-8 | |
130 | Perlowy interfejs do DAHDI. | |
131 | ||
132 | %prep | |
133 | %setup -q | |
134 | %patch0 -p1 | |
135 | %patch1 -p1 | |
136 | %patch2 -p1 | |
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 | |
144 | ||
145 | %build | |
146 | %configure | |
147 | %{__make} \ | |
148 | CC="%{__cc}" \ | |
149 | OPTFLAGS="%{rpmcppflags} %{rpmcflags}" | |
150 | ||
151 | %install | |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
154 | ||
155 | %{__make} -j1 config install \ | |
156 | DESTDIR=$RPM_BUILD_ROOT | |
157 | ||
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 | ||
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 | ||
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 | |
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 | |
200 | %attr(755,root,root) %{_sbindir}/astribank_* | |
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 | |
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 | |
211 | %attr(755,root,root) %{_sbindir}/fxotune | |
212 | %attr(755,root,root) %{_sbindir}/sethdlc | |
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 | |
217 | %{_datadir}/dahdi | |
218 | %{_mandir}/man8/astribank_*.8* | |
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* | |
225 | %{_mandir}/man8/fxotune.8* | |
226 | %{_mandir}/man8/dahdi_span_assignments.8* | |
227 | %{_mandir}/man8/dahdi_span_types.8* | |
228 | %{_mandir}/man8/dahdi_waitfor_span_assignments.8* | |
229 | ||
230 | %files devel | |
231 | %defattr(644,root,root,755) | |
232 | %attr(755,root,root) %{_libdir}/libtonezone.so | |
233 | %{_includedir}/dahdi/tonezone.h | |
234 | ||
235 | %files static | |
236 | %defattr(644,root,root,755) | |
237 | %{_libdir}/libtonezone.a | |
238 | ||
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 | |
248 | # for dahdi_genconf | |
249 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/genconf_parameters | |
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 | ||
258 | %files init | |
259 | %defattr(644,root,root,755) | |
260 | %attr(754,root,root) /etc/rc.d/init.d/dahdi | |
261 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dahdi | |
262 | ||
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 | ||
268 | %files -n bash-completion-dahdi | |
269 | %defattr(644,root,root,755) | |
270 | /etc/bash_completion.d/dahdi | |
271 | ||
272 | %files -n perl-Dahdi | |
273 | %defattr(644,root,root,755) | |
274 | %{perl_vendorlib}/Dahdi | |
275 | %{perl_vendorlib}/Dahdi.pm |