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