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