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