3 # warning: Installed (but unpackaged) file(s) found:
4 # /etc/hotplug/usb/xpp_fxloader
5 # /etc/hotplug/usb/xpp_fxloader.usermap
8 %bcond_with oslec # with Open Source Line Echo Canceller
9 %bcond_with bristuff # with bristuff support
10 %bcond_without xpp # without Astribank
13 %include /usr/lib/rpm/macros.perl
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 Patch1: %{name}-perl-path.patch
36 URL: http://www.asterisk.org/
38 BuildRequires: dahdi-linux-devel
39 BuildRequires: newt-devel
40 BuildRequires: perl-base
41 BuildRequires: perl-tools-pod
42 BuildRequires: rpmbuild(macros) >= 1.379
43 BuildRequires: rpm-perlprov >= 4.1-13
44 %{?with_bristuff:Provides: dahdi(bristuff)}
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 # - modules_X: single modules, just name module with no suffix
49 # - modules_X: subdir modules are just directory name with slash like dirname/
50 # - keep X and X_in in sync
51 # - X is used for actual building (entries separated with space), X_in for pld macros (entries separated with comma)
54 DAHDI telephony device driver.
56 %description -l pl.UTF-8
57 Sterownik do urządzeń telefonicznych DAHDI.
60 Summary: DAHDI development headers
61 Summary(pl.UTF-8): Pliki nagłówkowe DAHDI
62 Group: Development/Libraries
63 Requires: %{name} = %{version}-%{rel}
64 Obsoletes: zaptel-devel
65 %{?with_bristuff:Provides: dahdi-devel(bristuff)}
68 DAHDI development headers.
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe DAHDI.
74 Summary: DAHDI static library
75 Summary(pl.UTF-8): Biblioteka statyczna DAHDI
76 Group: Development/Libraries
77 Requires: %{name}-devel = %{version}-%{rel}
78 %{?with_bristuff:Provides: dahdi-static(bristuff)}
83 %description static -l pl.UTF-8
84 Biblioteka statyczna DAHDI.
87 Summary: DAHDI utility programs
88 Summary(pl.UTF-8): Programy narzędziowe DAHDI
89 Obsoletes: zaptel-utils
90 Group: Applications/Communications
93 DAHDI card utility programs, mainly for diagnostics.
95 %description utils -l pl.UTF-8
96 Programy narzędziowe do kart DAHDI, służące głównie do diagnostyki.
99 Summary: DAHDI init scripts
100 Summary(pl.UTF-8): Skrypty inicjalizujące DAHDI
101 Group: Applications/Communications
102 Requires(post,preun): /sbin/chkconfig
103 Obsoletes: zaptel-init
104 Requires: %{name}-utils = %{version}-%{rel}
108 DAHDI boot-time initialization.
110 %description init -l pl.UTF-8
111 Inicjalizacja DAHDI w czasie startu systemu.
113 %package -n perl-Dahdi
114 Summary: Perl interface to DAHDI
115 Summary(pl.UTF-8): Perlowy interfejs do DAHDIa
116 Group: Development/Languages/Perl
117 Requires: %{name} = %{version}-%{rel}
119 %description -n perl-Dahdi
120 Perl inferface to DAHDI.
122 %description -n perl-Dahdi -l pl.UTF-8
123 Perlowy interfejs do DAHDIa.
132 for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
134 tar -C firmware -xzf $a
137 cat > download-logger <<'EOF'
139 # keep log of files make wanted to download in firmware/ dir
140 echo "$@" >> download.log
142 chmod a+rx download-logger
149 OPTFLAGS="%{rpmcppflags} %{rpmcflags}"
152 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
156 %{__make} -j1 install \
157 DESTDIR=$RPM_BUILD_ROOT
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
163 rm -rf $RPM_BUILD_ROOT
166 /sbin/chkconfig --add dahdi
167 %service dahdi restart
170 if [ "$1" = "0" ]; then
172 /sbin/chkconfig --del dahdi
176 %defattr(644,root,root,755)
178 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi.conf
179 %dir %{_sysconfdir}/dahdi
180 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dahdi/system.conf
181 #/etc/hotplug/usb/xpp_fxloader
182 #/etc/hotplug/usb/xpp_fxloader.usermap
183 %attr(755,root,root) %{_sbindir}/*
184 %attr(755,root,root) %{_libdir}/*.so.*
190 %defattr(644,root,root,755)
191 %attr(754,root,root) /etc/rc.d/init.d/*
192 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dahdi
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/*.so
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/*.a
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_sbindir}/*
208 %defattr(644,root,root,755)
209 %{perl_vendorlib}/Dahdi
210 %{perl_vendorlib}/Dahdi.pm