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
10 %bcond_with oslec # with Open Source Line Echo Canceller
11 %bcond_with bristuff # with bristuff support
12 %bcond_without xpp # without Astribank
23 Summary: DAHDI telephony device support
24 Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI
27 Release: %{rel}%{?with_bristuff:.bristuff}
30 Source0: http://downloads.digium.com/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz
31 # Source0-md5: a018f452f3851a312ff51705ac44de37
33 Source2: dahdi.sysconfig
34 Patch0: %{name}-as-needed.patch
35 URL: http://www.asterisk.org/
37 BuildRequires: dahdi-linux-devel
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)
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)
52 DAHDI telephony device driver.
54 %description -l pl.UTF-8
55 Sterownik do urządzeń telefonicznych DAHDI.
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)}
66 DAHDI development headers.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe DAHDI.
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)}
81 %description static -l pl.UTF-8
82 Biblioteka statyczna DAHDI.
85 Summary: DAHDI utility programs
86 Summary(pl.UTF-8): Programy narzędziowe DAHDI
87 Obsoletes: zaptel-utils
88 Group: Applications/Communications
91 DAHDI card utility programs, mainly for diagnostics.
93 %description utils -l pl.UTF-8
94 Programy narzędziowe do kart DAHDI, służące głównie do diagnostyki.
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}
106 DAHDI boot-time initialization.
108 %description init -l pl.UTF-8
109 Inicjalizacja DAHDI w czasie startu systemu.
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}
117 %description -n perl-Dahdi
118 Perl inferface to DAHDI.
120 %description -n perl-Dahdi -l pl.UTF-8
121 Perlowy interfejs do DAHDIa.
129 for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
131 tar -C firmware -xzf $a
134 cat > download-logger <<'EOF'
136 # keep log of files make wanted to download in firmware/ dir
137 echo "$@" >> download.log
139 chmod a+rx download-logger
146 OPTFLAGS="%{rpmcppflags} %{rpmcflags}"
149 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
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
160 rm -rf $RPM_BUILD_ROOT
163 /sbin/chkconfig --add dahdi
164 %service dahdi restart
167 if [ "$1" = "0" ]; then
169 /sbin/chkconfig --del dahdi
173 %defattr(644,root,root,755)
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.*
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
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/*.so
197 %defattr(644,root,root,755)
198 %attr(755,root,root) %{_libdir}/*.a
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_sbindir}/*
205 %defattr(644,root,root,755)
206 #%{perl_vendorlib}/Dahdi
207 #%{perl_vendorlib}/Dahdi.pm