]> git.pld-linux.org Git - packages/dahdi-tools.git/blame - dahdi-tools.spec
- updated for 2.2.0
[packages/dahdi-tools.git] / dahdi-tools.spec
CommitLineData
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
23Summary: DAHDI telephony device support
24Summary(pl.UTF-8): Obsługa urządzeń telefonicznych DAHDI
25Name: dahdi-tools
2b540928 26Version: 2.2.0
cb361dd9 27Release: %{rel}%{?with_bristuff:.bristuff}
28License: GPL
29Group: Base/Kernel
30Source0: http://downloads.digium.com/pub/telephony/dahdi-tools/%{name}-%{version}.tar.gz
2b540928 31# Source0-md5: a018f452f3851a312ff51705ac44de37
cb361dd9 32Source1: dahdi.init
33Source2: dahdi.sysconfig
34Patch0: %{name}-as-needed.patch
35URL: http://www.asterisk.org/
36Obsoletes: zaptel
1a3180a1 37BuildRequires: dahdi-linux-devel
cb361dd9 38BuildRequires: newt-devel
39BuildRequires: perl-base
40BuildRequires: perl-tools-pod
41BuildRequires: rpmbuild(macros) >= 1.379
42%{?with_bristuff:Provides: dahdi(bristuff)}
43BuildRoot: %{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
52DAHDI telephony device driver.
53
54%description -l pl.UTF-8
55Sterownik do urządzeń telefonicznych DAHDI.
56
57%package devel
58Summary: DAHDI development headers
59Summary(pl.UTF-8): Pliki nagłówkowe DAHDI
60Group: Development/Libraries
61Requires: %{name} = %{version}-%{rel}
62Obsoletes: zaptel-devel
63%{?with_bristuff:Provides: dahdi-devel(bristuff)}
64
65%description devel
66DAHDI development headers.
67
68%description devel -l pl.UTF-8
69Pliki nagłówkowe DAHDI.
70
71%package static
72Summary: DAHDI static library
73Summary(pl.UTF-8): Biblioteka statyczna DAHDI
74Group: Development/Libraries
75Requires: %{name}-devel = %{version}-%{rel}
76%{?with_bristuff:Provides: dahdi-static(bristuff)}
77
78%description static
79DAHDI static library.
80
81%description static -l pl.UTF-8
82Biblioteka statyczna DAHDI.
83
84%package utils
85Summary: DAHDI utility programs
86Summary(pl.UTF-8): Programy narzędziowe DAHDI
87Obsoletes: zaptel-utils
88Group: Applications/Communications
89
90%description utils
91DAHDI card utility programs, mainly for diagnostics.
92
93%description utils -l pl.UTF-8
94Programy narzędziowe do kart DAHDI, służące głównie do diagnostyki.
95
96%package init
97Summary: DAHDI init scripts
98Summary(pl.UTF-8): Skrypty inicjalizujące DAHDI
99Group: Applications/Communications
100Requires(post,preun): /sbin/chkconfig
101Obsoletes: zaptel-init
102Requires: %{name}-utils = %{version}-%{rel}
103Requires: rc-scripts
104
105%description init
106DAHDI boot-time initialization.
107
108%description init -l pl.UTF-8
109Inicjalizacja DAHDI w czasie startu systemu.
110
111%package -n perl-Dahdi
112Summary: Perl interface to DAHDI
113Summary(pl.UTF-8): Perlowy interfejs do DAHDIa
114Group: Development/Languages/Perl
115Requires: %{name} = %{version}-%{rel}
116
117%description -n perl-Dahdi
118Perl inferface to DAHDI.
119
120%description -n perl-Dahdi -l pl.UTF-8
121Perlowy interfejs do DAHDIa.
122
123%prep
124%setup -q
125%patch0 -p1
126
127%if %{with kernel}
128mkdir firmware
129for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
130 ln -s $a firmware
131 tar -C firmware -xzf $a
132done
133
134cat > download-logger <<'EOF'
135#!/bin/sh
136# keep log of files make wanted to download in firmware/ dir
137echo "$@" >> download.log
138EOF
139chmod 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
149rm -rf $RPM_BUILD_ROOT
150
151install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
152
153%{__make} install \
154 DESTDIR=$RPM_BUILD_ROOT
155install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dahdi
156install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dahdi
157touch $RPM_BUILD_ROOT%{_sysconfdir}/dahdi.conf
158
159%clean
160rm -rf $RPM_BUILD_ROOT
161
162%post init
163/sbin/chkconfig --add dahdi
164%service dahdi restart
165
166%preun init
167if [ "$1" = "0" ]; then
168 %service dahdi stop
169 /sbin/chkconfig --del dahdi
170fi
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
This page took 0.08811 seconds and 4 git commands to generate.