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