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