]> git.pld-linux.org Git - packages/ppp.git/blob - ppp.spec
8d5cf2374cc19e895ae396c970d34bd8bc649906
[packages/ppp.git] / ppp.spec
1 # TODO:
2 # - check mppc patch
3 # - check if %{_libdir}/pppd/%{version} path is needed, if not drop the symlink
4
5 # Conditional build:
6 %bcond_without  pppoatm # without PPPoATM plugin (which requires kernel 2.4 and atm-devel)
7 %bcond_without  srp     # without SRP support
8 #
9 Summary:        ppp daemon package for Linux
10 Summary(de.UTF-8):      ppp-Dämonpaket für Linux
11 Summary(es.UTF-8):      Servidor ppp para Linux
12 Summary(fr.UTF-8):      Paquetage du démon ppp pour Linux
13 Summary(pl.UTF-8):      Demon PPP dla Linuksa
14 Summary(pt_BR.UTF-8):   Servidor ppp para Linux
15 Summary(ru.UTF-8):      Демон ppp
16 Summary(tr.UTF-8):      PPP sunucu süreci
17 Summary(zh_CN.UTF-8):   PPP 配置和管理软件包.
18 Name:           ppp
19 Version:        2.4.5
20 Release:        7
21 Epoch:          3
22 License:        distributable
23 Group:          Networking/Daemons
24 Source0:        ftp://ftp.samba.org/pub/ppp/%{name}-%{version}.tar.gz
25 # Source0-md5:  4621bc56167b6953ec4071043fe0ec57
26 Source1:        %{name}.pamd
27 Source2:        %{name}.pon
28 Source3:        %{name}.poff
29 Source4:        http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
30 # Source4-md5:  3801b59005bef8f52856300fe3167a64
31 Source5:        %{name}.logrotate
32 Patch0:         %{name}-make.patch
33 Patch1:         %{name}-expect.patch
34 Patch2:         %{name}-debian_scripts.patch
35 Patch3:         %{name}-static.patch
36 Patch4:         %{name}-pidfile-owner.patch
37 Patch6:         %{name}-rp-pppoe-macaddr.patch
38 #Patch7:                http://public.planetmirror.com/pub/mppe/pppd-2.4.2-chapms-strip-domain.patch.gz
39 Patch7:         pppd-2.4.2-chapms-strip-domain.patch
40 Patch8:         %{name}-openssl.patch
41 Patch9:         %{name}-lib64.patch
42 #Patch10:       http://mppe-mppc.alphacron.de/%{name}-2.4.3-mppe-mppc-1.1.patch.gz
43 Patch10:        %{name}-2.4.3-mppe-mppc-1.1.patch
44 Patch11:        %{name}-llc.patch
45 Patch12:        %{name}-llh.patch
46 URL:            http://www.samba.org/ppp/
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  libpcap-devel >= 2:0.8.1
50 BuildRequires:  libtool
51 %{?with_pppoatm:BuildRequires:  linux-atm-devel}
52 # <linux/if_pppol2tp.h>
53 BuildRequires:  linux-libc-headers >= 7:2.6.23
54 BuildRequires:  openssl-devel
55 BuildRequires:  pam-devel
56 %{?with_srp:BuildRequires:      srp-devel}
57 Requires:       pam >= 0.77.3
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 This is the daemon and documentation for PPP support. It requires a
62 kernel greater than 2.2.11 which is built with PPP support. The
63 default kernels include PPP support as a module. This version supports
64 IPv6, too.
65
66 %description -l de.UTF-8
67 Dies ist der Dämon und die Dokumentation für PPP-Support. Erfordert
68 einen Kernel höher als 2.2.11, der mit PPP-Support gebaut ist. Die
69 Standard-Kernel schließen PPP-Support als Modul ein. (IPv6)
70
71 %description -l es.UTF-8
72 Este es el servidor y la documentación para soporte PPP. Requiere un
73 kernel superior al 2.0.
74
75 %description -l fr.UTF-8
76 Ceci est le démon et la documentation pour le support PPP. Cela
77 réclame un noyau supérieur au 2.2.11 et construit avec le support PPP.
78
79 %description -l pl.UTF-8
80 Pakiet zawiera demona i dokumentację umożliwiającą korzystanie z
81 protokołu PPP. Wymaga jądra 2.2.11 - lub późniejszego - z wkompilowaną
82 obsługą protokołu PPP. Standardowe jądro z dystrybucji zawiera
83 wsparcie dla PPP skompilowane jako moduł. (IPv6)
84
85 %description -l pt_BR.UTF-8
86 Este é o servidor e a documentação para suporte PPP. Ele requer um
87 kernel superior ao 2.0.
88
89 %description -l ru.UTF-8
90 Демон, конфигурационные файлы и документация для поддержки PPP.
91
92 %description -l tr.UTF-8
93 Bu paket PPP desteği için belgeler ve sunucu sürecini içerir. Çekirdek
94 sürümünun 2.2.11'dan daha yüksek olmasını gerektirir.
95
96 %package plugin-devel
97 Summary:        Stuff needed to build plugins for pppd
98 Summary(pl.UTF-8):      Rzeczy potrzebne do budowania wtyczek dla pppd
99 Group:          Development/Libraries
100 # doesn't require base but enforce new version
101 Conflicts:      %{name} < %{epoch}:%{version}-%{release}
102
103 %description plugin-devel
104 Development files needed to build plugins for pppd.
105
106 %description plugin-devel -l pl.UTF-8
107 Pliki nagłówkowe potrzebne do budowania wtyczek dla pppd.
108
109 %package plugin-pppoatm
110 Summary:        PPPoATM plugin for pppd
111 Summary(pl.UTF-8):      Wtyczka PPPoATM dla pppd
112 Group:          Libraries
113 Requires:       %{name} = %{epoch}:%{version}-%{release}
114
115 %description plugin-pppoatm
116 PPPoATM plugin for pppd.
117
118 %description plugin-pppoatm -l pl.UTF-8
119 Wtyczka PPPoATM dla pppd.
120
121 %prep
122 %setup -q
123 %patch0 -p1
124 %patch1 -p1
125 %patch2 -p1
126 %patch3 -p1
127 %patch4 -p1
128 %patch6 -p1
129 %patch7 -p1
130 %patch8 -p1
131 %if "%{_lib}" == "lib64"
132 %patch9 -p1
133 %endif
134 %patch10 -p1
135 %patch11 -p1
136 %patch12 -p1
137
138 # use headers from llh instead of older supplied by ppp, incompatible with current llh
139 %{__rm} include/linux/*.h
140
141 %build
142 # note: not autoconf configure
143 %configure
144 %{__make} \
145         %{?with_pppoatm:HAVE_LIBATM=y} \
146         %{?with_srp:USE_SRP=y} \
147         OPT_FLAGS="%{rpmcflags} %{rpmcppflags}" \
148         COPTS="%{rpmcflags} %{rpmcppflags}" \
149         OPTLDFLAGS="%{rpmldflags}" \
150         CC="%{__cc}"
151
152 %install
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/ppp/peers,/var/log} \
155         $RPM_BUILD_ROOT/etc/{pam.d,logrotate.d}
156
157 %{__make} install \
158         %{?with_pppoatm:HAVE_LIBATM=y} \
159         %{?with_srp:USE_SRP=y} \
160         DESTDIR=$RPM_BUILD_ROOT%{_prefix}
161
162 install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pon
163 install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poff
164 install -p debian/plog $RPM_BUILD_ROOT%{_bindir}
165
166 cp -p etc.ppp/chap-secrets $RPM_BUILD_ROOT%{_sysconfdir}/ppp
167 cp -p debian/pap-secrets $RPM_BUILD_ROOT%{_sysconfdir}/ppp
168 cp -p debian/options $RPM_BUILD_ROOT%{_sysconfdir}/ppp
169 cp -p debian/options.ttyXX $RPM_BUILD_ROOT%{_sysconfdir}/ppp
170
171 bzip2 -dc %{SOURCE4} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
172 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.ppp-non-english-man-pages
173
174 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/ppp
175 > $RPM_BUILD_ROOT/var/log/ppp.log
176
177 rm -f scripts/README
178
179 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ppp
180
181 cd $RPM_BUILD_ROOT%{_libdir}/pppd
182 v=$(echo %{version}*)
183 mv $v plugins
184 # not sure which path used, keep the old path for compat
185 ln -s plugins $v
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %pretrans
191 # %{version} used to be directory
192 if [ -d %{_libdir}/pppd/%{version} -a ! -L %{_libdir}/pppd/%{version} ]; then
193         set -e
194         rm -f %{_libdir}/pppd/plugins
195         mv %{_libdir}/pppd/{%{version},plugins}
196         ln -sn plugins %{_libdir}/pppd/%{version}
197 fi
198
199 %files
200 %defattr(644,root,root,755)
201 %doc README.linux debian/README.debian scripts
202 %doc debian/win95.ppp README.MSCHAP8* FAQ debian/ppp-2.3.0.STATIC.README
203 %doc README.MPPE README.pppoe README.cbcp README.pwfd
204 %attr(755,root,root) %{_bindir}/plog
205 %attr(755,root,root) %{_bindir}/poff
206 %attr(755,root,root) %{_bindir}/pon
207 %attr(755,root,root) %{_sbindir}/chat
208 %attr(755,root,root) %{_sbindir}/pppd
209 %attr(755,root,root) %{_sbindir}/pppdump
210 %attr(755,root,root) %{_sbindir}/pppoe-discovery
211 %attr(755,root,root) %{_sbindir}/pppstats
212 %{?with_srp:%attr(755,root,root) %{_sbindir}/srp-entry}
213 %dir %{_libdir}/pppd
214 %dir %{_libdir}/pppd/plugins
215 %attr(755,root,root) %{_libdir}/pppd/plugins/minconn.so
216 %attr(755,root,root) %{_libdir}/pppd/plugins/openl2tp.so
217 %attr(755,root,root) %{_libdir}/pppd/plugins/pppol2tp.so
218 %attr(755,root,root) %{_libdir}/pppd/plugins/passprompt.so
219 %attr(755,root,root) %{_libdir}/pppd/plugins/passwordfd.so
220 %attr(755,root,root) %{_libdir}/pppd/plugins/rp-pppoe.so
221 %attr(755,root,root) %{_libdir}/pppd/plugins/radattr.so
222 %attr(755,root,root) %{_libdir}/pppd/plugins/radius.so
223 %attr(755,root,root) %{_libdir}/pppd/plugins/radrealms.so
224 %attr(755,root,root) %{_libdir}/pppd/plugins/winbind.so
225
226 # TODO: legacy, try to drop
227 %{_libdir}/pppd/%{version}
228
229 %{_mandir}/man8/chat.8*
230 %{_mandir}/man8/pppd.8*
231 %{_mandir}/man8/pppd-radattr.8*
232 %{_mandir}/man8/pppd-radius.8*
233 %{_mandir}/man8/pppdump.8*
234 %{_mandir}/man8/pppstats.8*
235 %lang(fr) %{_mandir}/fr/man8/*
236 %lang(ja) %{_mandir}/ja/man8/*
237 %lang(ko) %{_mandir}/ko/man8/*
238 %lang(pl) %{_mandir}/pl/man8/*
239
240 %attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/chap-secrets
241 %attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/pap-secrets
242 %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options
243 %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options.ttyXX
244 %dir %{_sysconfdir}/ppp/peers
245 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/ppp
246 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ppp
247 %attr(640,root,root) %ghost /var/log/ppp.log
248
249 %files plugin-devel
250 %defattr(644,root,root,755)
251 %{_includedir}/pppd
252
253 %if %{with pppoatm}
254 %files plugin-pppoatm
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/pppd/plugins/pppoatm.so
257 %endif
This page took 0.066159 seconds and 2 git commands to generate.