]> git.pld-linux.org Git - packages/dahdi-tools.git/blob - dahdi-tools.spec
831e7502e92ad59e676d9ac5165ec5f363c82923
[packages/dahdi-tools.git] / dahdi-tools.spec
1 #
2 # TODO:
3 # warning: Installed (but unpackaged) file(s) found:
4 #    /etc/hotplug/usb/xpp_fxloader
5 #    /etc/hotplug/usb/xpp_fxloader.usermap
6 #
7 # Conditional build:
8 %bcond_with     oslec           # with Open Source Line Echo Canceller
9 %bcond_with     bristuff        # with bristuff support
10 %bcond_without  xpp             # without Astribank
11 %bcond_with     verbose
12
13 %include        /usr/lib/rpm/macros.perl
14
15 %ifarch sparc
16 %undefine       with_smp
17 %endif
18 %ifarch alpha
19 %undefine       with_xpp
20 %endif
21
22 %define         rel     1
23 Summary:        DAHDI telephony device support
24 Summary(pl.UTF-8):      Obsługa urządzeń telefonicznych DAHDI
25 Name:           dahdi-tools
26 Version:        2.2.0
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:  a018f452f3851a312ff51705ac44de37
32 Source1:        dahdi.init
33 Source2:        dahdi.sysconfig
34 Patch0:         %{name}-as-needed.patch
35 Patch1:         %{name}-perl-path.patch
36 URL:            http://www.asterisk.org/
37 Obsoletes:      zaptel
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)
46
47 # Rules:
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)
52
53 %description
54 DAHDI telephony device driver.
55
56 %description -l pl.UTF-8
57 Sterownik do urządzeń telefonicznych DAHDI.
58
59 %package devel
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)}
66
67 %description devel
68 DAHDI development headers.
69
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe DAHDI.
72
73 %package static
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)}
79
80 %description static
81 DAHDI static library.
82
83 %description static -l pl.UTF-8
84 Biblioteka statyczna DAHDI.
85
86 %package utils
87 Summary:        DAHDI utility programs
88 Summary(pl.UTF-8):      Programy narzędziowe DAHDI
89 Obsoletes:      zaptel-utils
90 Group:          Applications/Communications
91
92 %description utils
93 DAHDI card utility programs, mainly for diagnostics.
94
95 %description utils -l pl.UTF-8
96 Programy narzędziowe do kart DAHDI, służące głównie do diagnostyki.
97
98 %package init
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}
105 Requires:       rc-scripts
106
107 %description init
108 DAHDI boot-time initialization.
109
110 %description init -l pl.UTF-8
111 Inicjalizacja DAHDI w czasie startu systemu.
112
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}
118
119 %description -n perl-Dahdi
120 Perl inferface to DAHDI.
121
122 %description -n perl-Dahdi -l pl.UTF-8
123 Perlowy interfejs do DAHDIa.
124
125 %prep
126 %setup -q
127 %patch0 -p1
128 %patch1 -p1
129
130 %if %{with kernel}
131 mkdir firmware
132 for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6}; do
133         ln -s $a firmware
134         tar -C firmware -xzf $a
135 done
136
137 cat > download-logger <<'EOF'
138 #!/bin/sh
139 # keep log of files make wanted to download in firmware/ dir
140 echo "$@" >> download.log
141 EOF
142 chmod a+rx download-logger
143 %endif
144
145 %build
146 %configure
147 %{__make} \
148         CC="%{__cc}" \
149         OPTFLAGS="%{rpmcppflags} %{rpmcflags}"
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153
154 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
155
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
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post init
166 /sbin/chkconfig --add dahdi
167 %service dahdi restart
168
169 %preun init
170 if [ "$1" = "0" ]; then
171         %service dahdi stop
172         /sbin/chkconfig --del dahdi
173 fi
174
175 %files
176 %defattr(644,root,root,755)
177 %doc README
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.*
185 %if %{with xpp}
186 %{_datadir}/dahdi
187 %{_mandir}/man8/*
188
189 %files init
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
193
194 %files devel
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/*.so
197 %{_includedir}/dahdi
198
199 %files static
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_libdir}/*.a
202
203 %files utils
204 %defattr(644,root,root,755)
205 %attr(755,root,root) %{_sbindir}/*
206
207 %files -n perl-Dahdi
208 %defattr(644,root,root,755)
209 %{perl_vendorlib}/Dahdi
210 %{perl_vendorlib}/Dahdi.pm
211 %endif
This page took 0.044165 seconds and 2 git commands to generate.