]> git.pld-linux.org Git - packages/capi4k-utils.git/blob - capi4k-utils.spec
- use unversioned ppp dir
[packages/capi4k-utils.git] / capi4k-utils.spec
1 #
2 # Conditional build:
3 %bcond_with     capifax # capifax has some error and won't build right now
4
5 Summary:        CAPI 2.0 libraries and configuration tools
6 Summary(de.UTF-8):      CAPI 2.0 Werkzeuge für verschiedene ISDN Karten
7 Summary(pl.UTF-8):      Biblioteki i narzędzia konfiguracyjne CAPI 2.0
8 Name:           capi4k-utils
9 Version:        2005.07.18
10 Release:        4
11 License:        GPL
12 Group:          Applications/Communications
13 Source0:        ftp://ftp.in-berlin.de/pub/capi4linux/%{name}-2005-07-18.tar.gz
14 # Source0-md5:  c745759b6b3d64e19763727176648cdf
15 Source1:        ftp://ftp.in-berlin.de/pub/capi4linux/CHANGES
16 # Source1-md5:  03739a0170eba14f03f7dc7ccc58bba8
17 Source10:       capi.conf
18 Source11:       capi.init
19 Patch0:         %{name}-include.patch
20 Patch1:         %{name}-make.patch
21 Patch2:         %{name}-msg2str_safety.patch
22 Patch3:         %{name}-ppd244.patch
23 Patch4:         %{name}-ppd245.patch
24 Patch5:         %{name}-rcapid.patch
25 Patch6:         %{name}-amd64.patch
26 URL:            ftp://ftp.in-berlin.de/pub/capi4linux/
27 BuildRequires:  libtool
28 BuildRequires:  ppp-plugin-devel
29 BuildRequires:  rpmbuild(macros) >= 1.268
30 Requires(post): /sbin/ldconfig
31 Requires(post,preun):   /sbin/chkconfig
32 Requires:       rc-scripts
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define         ppp_ver         %(awk -F'"' '/VERSION/ { print $2 }' /usr/include/pppd/patchlevel.h 2>/dev/null || echo ERROR)
36
37 %description
38 These are the necessary tools to operate various CAPI 2.0 compatible
39 ISDN adapters.
40
41 In order to use the tools you need to install the appropriate driver
42 for the adapter. Native driver packages for some adapters are provided
43 with the kernel.
44
45 %description -l de.UTF-8
46 Dies sind die notwendigen Grundprogramme um verschiedene CAPI 2.0
47 fähige Geräte und ISDN Karten einzurichten. Für einige Karten müssen
48 Sie zusätzlich entsprechende Treiber installieren.
49
50 %description -l pl.UTF-8
51 W tym pakiecie zawarte są biblioteki współdzielone libcapi20 oraz
52 narzędzia służące do ładowania i konfiguracji sterowników CAPI.
53
54 Aby skorzystać z tych narzędzi potrzebny jest jeszcze odpowiedni
55 sterownik do karty ISDN. Kilka takich sterowników znajduje się już w
56 jądrze.
57
58 %package devel
59 Summary:        Header files for capi development
60 Summary(de.UTF-8):      Kopfdateien zur Entwicklung von CAPI Programmen
61 Summary(pl.UTF-8):      Pliki nagłówkowe capi
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64
65 %description devel
66 This package contains the header files required to develop capi
67 applications.
68
69 %description devel -l pl.UTF-8
70 Ten pakiet zawiera pliki nagłówkowe potrzebne do budowania programów
71 korzystających ze sterowników w standardzie CAPI poprzez bibliotekę
72 libcapi.
73
74 %description devel -l de.UTF-8
75 Dieses Paket stellt die Dateien bereit um CAPI Programme zu entwickeln
76 oder neu zu Übersetzen.
77
78 %package static
79 Summary:        Static capi libraries
80 Summary(pl.UTF-8):      Statyczne biblioteki capi
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static versions of capi libraries.
86
87 %description static -l pl.UTF-8
88 Statyczne wersje bibliotek capi.
89
90 %if %{with capifax}
91 %package capifax
92 Summary:        CAPI 2.0 fax tool
93 Summary(de.UTF-8):      CAPI 2.0 Fax Programm
94 Summary(pl.UTF-8):      Proste narzędzia do faksowania wykorzystujący możliwości CAPI 2.0
95 Group:          Applications/Communications
96 Requires:       %{name} = %{version}-%{release}
97
98 %description capifax
99 Native tools for sending and receiving fax with CAPI 2.0.
100
101 HINT: If you intend to use other CAPI 2.0 compliant fax software you
102       do not need to install this package.
103
104 %description capifax -l de.UTF-8
105 Basis Programm zum Senden und Empfangen von Fax mittels CAPI 2.0.
106
107 HINWEIS: Falls Sie andere CAPI 2.0 fähige Faxprogramme einsetzen
108          wollen brauchen Sie dieses Paket nicht installieren.
109
110 %description capifax -l pl.UTF-8
111 Podstawowe programy do wysyłania i odbierania faksów przez CAPI 2.0.
112
113 PORADA: Jeśli zamierzasz korzystać z innego pakietu do obsługi faksów
114         (np. capisuite lub hylafax) to nie potrzebujesz tego pakietu.
115
116 %endif
117
118 %package remotecapi
119 Summary:        CAPI 2.0 remote tool
120 Summary(de.UTF-8):      CAPI 2.0 Fernsteuerungsprogramm
121 Summary(pl.UTF-8):      Program udostępniający interface CAPI 2.0 przez sieć
122 Group:          Applications/Communications
123 Requires:       %{name} = %{version}-%{release}
124
125 %description remotecapi
126 Native tool for remote control (login) with CAPI 2.0.
127
128 ATTENTION: This is extreme BETA.
129            Avoid to install this package.
130
131 %description remotecapi -l de.UTF-8
132 Basis Programm zu Fernsteuerung (Login) mittels CAPI 2.0.
133
134 ACHTUNG: Dieses Programm ist BETA Testsoftware.
135          Vermeiden Sie dieses Paket zu installieren.
136
137 %description remotecapi -l pl.UTF-8
138 Program udostępniający interface CAPI 2.0 przez sieć
139
140 UWAGA: To jest na razie BETA. Tylko do testów.
141
142 %package -n ppp-plugin-capi
143 Summary:        capiplugin for pppd
144 Summary(pl.UTF-8):      Wtyczka capi dla pppd
145 Group:          Applications/Communications
146 Requires:       %{name} = %{version}-%{release}
147 Requires:       ppp
148
149 %description -n ppp-plugin-capi
150 capiplugin for pppd.
151
152 %description -n ppp-plugin-capi -l pl.UTF-8
153 Wtyczka capi dla pppd.
154
155 %prep
156 %setup -q -n %{name}
157 %patch0 -p1
158 %patch1 -p1
159 %patch2 -p0
160 %patch3 -p0
161 %patch4 -p0
162 %patch5 -p1
163 %if "%{_lib}" == "lib64"
164 %patch6 -p1
165 %endif
166
167 cat > .config << END
168 CONFIG_BINDIR='%{_bindir}'
169 CONFIG_SBINDIR='%{_sbindir}'
170 CONFIG_MANDIR='%{_mandir}'
171 CONFIG_AVMCAPICTRL=y
172 CONFIG_LIBDIR='%{_libdir}'
173 %{?with_capifax:CONFIG_CAPIFAX=y}
174 CONFIG_RCAPID=y
175 CONFIG_PPPDCAPIPLUGIN=y
176 END
177
178 install -p %{SOURCE1} .
179
180 %build
181 %{__make} subconfig \
182         CC="%{__cc}"
183
184 %{__make} \
185         CC="%{__cc}"
186         PPPVERSIONS=%{ppp_ver}
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190
191 %{__make} install \
192         PPPVERSIONS=%{ppp_ver} \
193         DESTDIR=$RPM_BUILD_ROOT
194
195 mv $RPM_BUILD_ROOT%{_libdir}/pppd/{%{ppp_ver},plugins}
196
197 # Firmware goes here - see LSB and kernel 2.6.x ISDN stuff
198 install -d $RPM_BUILD_ROOT%{_datadir}/isdn
199
200 # install capi configuration file used by capiinit
201 install -d $RPM_BUILD_ROOT%{_sysconfdir}/capi
202 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/capi
203
204 # install capi startup script
205 install -D %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/capi
206
207 %clean
208 rm -rf $RPM_BUILD_ROOT
209
210 %post
211 /sbin/ldconfig
212 /sbin/chkconfig --add capi
213 %service capi restart
214
215 %preun
216 if [ "$1" = "0" ]; then
217         %service capi stop
218         /sbin/chkconfig --del capi
219 fi
220
221 %postun -p /sbin/ldconfig
222
223 %files
224 %defattr(644,root,root,755)
225 %doc CHANGES pppdcapiplugin/examples
226 %attr(755,root,root) %{_bindir}/capiinfo
227 %attr(755,root,root) %{_sbindir}/capiinit
228 %attr(755,root,root) %{_sbindir}/avmcapictrl
229 %ghost %{_libdir}/libcapi20.so.3
230 %attr(755,root,root) %{_libdir}/lib*.so.*.*
231 %attr(754,root,root) /etc/rc.d/init.d/capi
232 %{_mandir}/man8/capiinfo.8*
233 %{_mandir}/man8/avmcapictrl.8*
234 %dir %{_datadir}/isdn
235 %dir %{_sysconfdir}/capi
236 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/capi/capi.conf
237 # mi to nie chce dzialac, wypisuje ze brak pliku
238 #%ghost %{_sysconfdir}/capi.conf
239
240 %files devel
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/lib*.so
243 %{_libdir}/lib*.la
244 %{_includedir}/*
245
246 %files static
247 %defattr(644,root,root,755)
248 %{_libdir}/lib*.a
249
250 %if %{with capifax}
251 %files capifax
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_bindir}/capifax*
254 %endif
255
256 %files remotecapi
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_sbindir}/rcapid
259
260 %files -n ppp-plugin-capi
261 %defattr(644,root,root,755)
262 %exclude %{_sysconfdir}/drdsl
263 %exclude %{_sysconfdir}/ppp
264 %{_libdir}/pppd/plugins/*
265 %{_mandir}/man8/capiplugin.8*
This page took 0.052549 seconds and 4 git commands to generate.