]>
Commit | Line | Data |
---|---|---|
cb361dd9 | 1 | # |
2 | # TODO: | |
f3406a5e | 3 | # warning: Installed (but unpackaged) file(s) found: |
4 | # /etc/hotplug/usb/xpp_fxloader | |
5 | # /etc/hotplug/usb/xpp_fxloader.usermap | |
6 | # /usr/local/share/perl5/Dahdi.pm | |
7 | # /usr/local/share/perl5/Dahdi/Chans.pm | |
8 | # /usr/local/share/perl5/Dahdi/Config/Gen.pm | |
9 | # /usr/local/share/perl5/Dahdi/Config/Gen/Chandahdi.pm | |
10 | # /usr/local/share/perl5/Dahdi/Config/Gen/Modules.pm | |
11 | # /usr/local/share/perl5/Dahdi/Config/Gen/System.pm | |
12 | # /usr/local/share/perl5/Dahdi/Config/Gen/Unicall.pm | |
13 | # /usr/local/share/perl5/Dahdi/Config/Gen/Users.pm | |
14 | # /usr/local/share/perl5/Dahdi/Config/Gen/Xpporder.pm | |
15 | # /usr/local/share/perl5/Dahdi/Config/Params.pm | |
16 | # /usr/local/share/perl5/Dahdi/Hardware.pm | |
17 | # /usr/local/share/perl5/Dahdi/Hardware/PCI.pm | |
18 | # /usr/local/share/perl5/Dahdi/Hardware/USB.pm | |
19 | # /usr/local/share/perl5/Dahdi/Span.pm | |
20 | # /usr/local/share/perl5/Dahdi/Utils.pm | |
21 | # /usr/local/share/perl5/Dahdi/Xpp.pm | |
22 | # /usr/local/share/perl5/Dahdi/Xpp/Line.pm | |
23 | # /usr/local/share/perl5/Dahdi/Xpp/Mpp.pm | |
24 | # /usr/local/share/perl5/Dahdi/Xpp/Xbus.pm | |
25 | # /usr/local/share/perl5/Dahdi/Xpp/Xpd.pm | |
cb361dd9 | 26 | # |
27 | # Conditional build: | |
28 | %bcond_with oslec # with Open Source Line Echo Canceller | |
29 | %bcond_with bristuff # with bristuff support | |
30 | %bcond_without xpp # without Astribank | |
31 | %bcond_with verbose | |
32 | ||
33 | %ifarch sparc | |
34 | %undefine with_smp | |
35 | %endif | |
36 | %ifarch alpha | |
37 | %undefine with_xpp | |
38 | %endif | |
39 | ||
40 | %define rel 11 | |
41 | Summary: DAHDI telephony device support | |
42 | Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI | |
43 | Name: dahdi-tools | |
2b540928 | 44 | Version: 2.2.0 |
cb361dd9 | 45 | Release: %{rel}%{?with_bristuff:.bristuff} |
46 | License: GPL | |
47 | Group: Base/Kernel | |
48 | Source0: http://downloads.digium.com/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz | |
2b540928 | 49 | # Source0-md5: a018f452f3851a312ff51705ac44de37 |
cb361dd9 | 50 | Source1: dahdi.init |
51 | Source2: dahdi.sysconfig | |
52 | Patch0: %{name}-as-needed.patch | |
53 | URL: http://www.asterisk.org/ | |
54 | Obsoletes: zaptel | |
1a3180a1 | 55 | BuildRequires: dahdi-linux-devel |
cb361dd9 | 56 | BuildRequires: newt-devel |
57 | BuildRequires: perl-base | |
58 | BuildRequires: perl-tools-pod | |
59 | BuildRequires: rpmbuild(macros) >= 1.379 | |
60 | %{?with_bristuff:Provides: dahdi(bristuff)} | |
61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
62 | ||
63 | # Rules: | |
64 | # - modules_X: single modules, just name module with no suffix | |
65 | # - modules_X: subdir modules are just directory name with slash like dirname/ | |
66 | # - keep X and X_in in sync | |
67 | # - X is used for actual building (entries separated with space), X_in for pld macros (entries separated with comma) | |
68 | ||
69 | %description | |
70 | DAHDI telephony device driver. | |
71 | ||
72 | %description -l pl.UTF-8 | |
73 | Sterownik do urządzeń telefonicznych DAHDI. | |
74 | ||
75 | %package devel | |
76 | Summary: DAHDI development headers | |
77 | Summary(pl.UTF-8): Pliki nagłówkowe DAHDI | |
78 | Group: Development/Libraries | |
79 | Requires: %{name} = %{version}-%{rel} | |
80 | Obsoletes: zaptel-devel | |
81 | %{?with_bristuff:Provides: dahdi-devel(bristuff)} | |
82 | ||
83 | %description devel | |
84 | DAHDI development headers. | |
85 | ||
86 | %description devel -l pl.UTF-8 | |
87 | Pliki nagłówkowe DAHDI. | |
88 | ||
89 | %package static | |
90 | Summary: DAHDI static library | |
91 | Summary(pl.UTF-8): Biblioteka statyczna DAHDI | |
92 | Group: Development/Libraries | |
93 | Requires: %{name}-devel = %{version}-%{rel} | |
94 | %{?with_bristuff:Provides: dahdi-static(bristuff)} | |
95 | ||
96 | %description static | |
97 | DAHDI static library. | |
98 | ||
99 | %description static -l pl.UTF-8 | |
100 | Biblioteka statyczna DAHDI. | |
101 | ||
102 | %package utils | |
103 | Summary: DAHDI utility programs | |
104 | Summary(pl.UTF-8): Programy narzędziowe DAHDI | |
105 | Obsoletes: zaptel-utils | |
106 | Group: Applications/Communications | |
107 | ||
108 | %description utils | |
109 | DAHDI card utility programs, mainly for diagnostics. | |
110 | ||
111 | %description utils -l pl.UTF-8 | |
112 | Programy narzędziowe do kart DAHDI, służące głównie do diagnostyki. | |
113 | ||
114 | %package init | |
115 | Summary: DAHDI init scripts | |
116 | Summary(pl.UTF-8): Skrypty inicjalizujące DAHDI | |
117 | Group: Applications/Communications | |
118 | Requires(post,preun): /sbin/chkconfig | |
119 | Obsoletes: zaptel-init | |
120 | Requires: %{name}-utils = %{version}-%{rel} | |
121 | Requires: rc-scripts | |
122 | ||
123 | %description init | |
124 | DAHDI boot-time initialization. | |
125 | ||
126 | %description init -l pl.UTF-8 | |
127 | Inicjalizacja DAHDI w czasie startu systemu. | |
128 | ||
129 | %package -n perl-Dahdi | |
130 | Summary: Perl interface to DAHDI | |
131 | Summary(pl.UTF-8): Perlowy interfejs do DAHDIa | |
132 | Group: Development/Languages/Perl | |
133 | Requires: %{name} = %{version}-%{rel} | |
134 | ||
135 | %description -n perl-Dahdi | |
136 | Perl inferface to DAHDI. | |
137 | ||
138 | %description -n perl-Dahdi -l pl.UTF-8 | |
139 | Perlowy interfejs do DAHDIa. | |
140 | ||
141 | %prep | |
142 | %setup -q | |
143 | %patch0 -p1 | |
144 | ||
145 | %if %{with kernel} | |
146 | mkdir firmware | |
147 | for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do | |
148 | ln -s $a firmware | |
149 | tar -C firmware -xzf $a | |
150 | done | |
151 | ||
152 | cat > download-logger <<'EOF' | |
153 | #!/bin/sh | |
154 | # keep log of files make wanted to download in firmware/ dir | |
155 | echo "$@" >> download.log | |
156 | EOF | |
157 | chmod a+rx download-logger | |
158 | %endif | |
159 | ||
160 | %build | |
161 | %configure | |
1a3180a1 AM |
162 | %{__make} \ |
163 | CC="%{__cc}" \ | |
164 | OPTFLAGS="%{rpmcppflags} %{rpmcflags}" | |
cb361dd9 | 165 | |
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
169 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
170 | ||
171 | %{__make} install \ | |
172 | DESTDIR=$RPM_BUILD_ROOT | |
173 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dahdi | |
174 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dahdi | |
175 | touch $RPM_BUILD_ROOT%{_sysconfdir}/dahdi.conf | |
176 | ||
177 | %clean | |
178 | rm -rf $RPM_BUILD_ROOT | |
179 | ||
180 | %post init | |
181 | /sbin/chkconfig --add dahdi | |
182 | %service dahdi restart | |
183 | ||
184 | %preun init | |
185 | if [ "$1" = "0" ]; then | |
186 | %service dahdi stop | |
187 | /sbin/chkconfig --del dahdi | |
188 | fi | |
189 | ||
190 | %files | |
191 | %defattr(644,root,root,755) | |
192 | %doc README | |
193 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi.conf | |
194 | %dir %{_sysconfdir}/dahdi | |
195 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/system.conf | |
196 | #/etc/hotplug/usb/xpp_fxloader | |
197 | #/etc/hotplug/usb/xpp_fxloader.usermap | |
198 | %attr(755,root,root) %{_sbindir}/* | |
199 | %attr(755,root,root) %{_libdir}/*.so.* | |
200 | %if %{with xpp} | |
201 | %{_datadir}/dahdi | |
202 | %{_mandir}/man8/* | |
203 | ||
204 | %files init | |
205 | %defattr(644,root,root,755) | |
206 | %attr(754,root,root) /etc/rc.d/init.d/* | |
207 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dahdi | |
208 | ||
209 | %files devel | |
210 | %defattr(644,root,root,755) | |
211 | %attr(755,root,root) %{_libdir}/*.so | |
212 | %{_includedir}/dahdi | |
213 | ||
214 | %files static | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_libdir}/*.a | |
217 | ||
218 | %files utils | |
219 | %defattr(644,root,root,755) | |
220 | %attr(755,root,root) %{_sbindir}/* | |
221 | ||
222 | %files -n perl-Dahdi | |
223 | %defattr(644,root,root,755) | |
224 | #%{perl_vendorlib}/Dahdi | |
225 | #%{perl_vendorlib}/Dahdi.pm | |
226 | %endif |