# - check if %{_libdir}/pppd/%{version} path is needed, if not drop the symlink
# Conditional build:
-%bcond_without mppc # without MPPC support
-%bcond_without pppoatm # without PPPoATM plugin (which requires kernel 2.4 and atm-devel)
-%bcond_without srp # without SRP support
+%bcond_with mppc # MPPC/MPPE-56/LZS support (upstream-incompatible configuration, support not in mainline/PLD kernel)
+%bcond_without system_libatm # link PPPoATM plugin against system libatm
+%bcond_with srp # SRP support
+%bcond_without systemd # systemd notifications
#
Summary: ppp daemon package for Linux
Summary(de.UTF-8): ppp-Dämonpaket für Linux
Summary(tr.UTF-8): PPP sunucu süreci
Summary(zh_CN.UTF-8): PPP 配置和管理软件包
Name: ppp
-Version: 2.4.7
-Release: 3
+Version: 2.5.0
+Release: 1
Epoch: 3
License: distributable
Group: Networking/Daemons
-Source0: ftp://ftp.samba.org/pub/ppp/%{name}-%{version}.tar.gz
-# Source0-md5: 78818f40e6d33a1d1de68a1551f6595a
+Source0: https://download.samba.org/pub/ppp/%{name}-%{version}.tar.gz
+# Source0-md5: ce5fd7b9f6e1095ae6c0c11365c444eb
Source1: %{name}.pamd
Source2: %{name}.pon
Source3: %{name}.poff
Source4: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source4-md5: 3801b59005bef8f52856300fe3167a64
Source5: %{name}.logrotate
-Patch0: %{name}-make.patch
-Patch1: %{name}-expect.patch
Patch2: %{name}-debian_scripts.patch
-Patch3: %{name}-static.patch
Patch4: %{name}-pidfile-owner.patch
-Patch6: %{name}-rp-pppoe-macaddr.patch
-#Patch7: http://public.planetmirror.com/pub/mppe/pppd-2.4.2-chapms-strip-domain.patch.gz
+# http://public.planetmirror.com/pub/mppe/pppd-2.4.2-chapms-strip-domain.patch.gz
Patch7: pppd-2.4.2-chapms-strip-domain.patch
-Patch8: %{name}-openssl.patch
-Patch9: %{name}-lib64.patch
-#Patch10: http://mppe-mppc.alphacron.de/%{name}-2.4.3-mppe-mppc-1.1.patch.gz
+# http://mppe-mppc.alphacron.de/%{name}-2.4.3-mppe-mppc-1.1.patch.gz
Patch10: %{name}-2.4.3-mppe-mppc-1.1.patch
-Patch11: %{name}-ifpppstatsreq.patch
-Patch12: %{name}-libx32.patch
-URL: http://ppp.samba.org/
+URL: https://ppp.samba.org/
+BuildRequires: autoconf >= 2.69
+BuildRequires: automake
BuildRequires: libpcap-devel >= 2:0.8.1
-%{?with_pppoatm:BuildRequires: linux-atm-devel}
+BuildRequires: libtool >= 2:2
+%{?with_system_libatm:BuildRequires: linux-atm-devel}
# <linux/if_pppol2tp.h>
BuildRequires: linux-libc-headers >= 7:2.6.23
BuildRequires: openssl-devel
BuildRequires: pam-devel
%{?with_srp:BuildRequires: srp-devel}
+%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
Requires: pam >= 0.77.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
%patch2 -p1
-%patch3 -p1
%patch4 -p1
-%patch6 -p1
%patch7 -p1
-%patch8 -p1
-%if "%{_lib}" == "lib64"
-%patch9 -p1
-%endif
%if %{with mppc}
%patch10 -p1
%endif
-%patch11 -p1
-%if "%{_lib}" == "libx32"
-%patch12 -p1
-%endif
# use headers from llh instead of older supplied by ppp, incompatible with current llh
%{__rm} include/linux/*.h
+%{__sed} -i -e 's,/usr/lib64/openssl/engines/,/%{_lib}/engines-3/,' \
+ -e 's,/usr/lib64/,%{_libdir}/,' etc.ppp/openssl.cnf
+
%build
-# note: not autoconf configure
-%configure
-%{__make} \
- %{?with_pppoatm:HAVE_LIBATM=y} \
- USE_PAM=y \
- %{?with_srp:USE_SRP=y} \
- OPT_FLAGS="%{rpmcflags} %{rpmcppflags}" \
- COPTS="%{rpmcflags} %{rpmcppflags}" \
- OPTLDFLAGS="%{rpmldflags}" \
- CC="%{__cc}"
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ --enable-cbcp \
+ --enable-mslanman \
+ --enable-multilink \
+ --disable-silent-rules \
+ %{?with_systemd:--enable-systemd} \
+ --with-plugin-dir=%{_libdir}/pppd/plugins \
+ %{!?with_srp:--without-srp}
+
+%{__make}
%install
rm -rf $RPM_BUILD_ROOT
$RPM_BUILD_ROOT/etc/{pam.d,logrotate.d}
%{__make} install \
- %{?with_pppoatm:HAVE_LIBATM=y} \
- %{?with_srp:USE_SRP=y} \
- DESTDIR=$RPM_BUILD_ROOT%{_prefix}
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/*.la
install -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/pon
install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poff
cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/ppp
> $RPM_BUILD_ROOT/var/log/ppp.log
-rm -f scripts/README
-
cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ppp
-cd $RPM_BUILD_ROOT%{_libdir}/pppd
-v=$(echo %{version}*)
-mv $v plugins
-# not sure which path used, keep the old path for compat
-ln -s plugins $v
+[ ! -d example-scripts ] || %{__rm} -r example-scripts # make install reentrant
+cp -pr scripts example-scripts
+%{__rm} example-scripts/Makefile*
%clean
rm -rf $RPM_BUILD_ROOT
if [ -d %{_libdir}/pppd/%{version} -a ! -L %{_libdir}/pppd/%{version} ]; then
set -e
rm -f %{_libdir}/pppd/plugins
- mv %{_libdir}/pppd/{%{version},plugins}
- ln -sn plugins %{_libdir}/pppd/%{version}
+ mv -f %{_libdir}/pppd/{%{version},plugins}
+ ln -snf plugins %{_libdir}/pppd/%{version}
fi
%files
%defattr(644,root,root,755)
-%doc README.linux debian/README.debian scripts
-%doc debian/win95.ppp README.MSCHAP8* FAQ debian/ppp-2.3.0.STATIC.README
-%doc README.MPPE README.pppoe README.cbcp README.pwfd
+%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
%attr(755,root,root) %{_bindir}/plog
%attr(755,root,root) %{_bindir}/poff
%attr(755,root,root) %{_bindir}/pon
%dir %{_libdir}/pppd/plugins
%attr(755,root,root) %{_libdir}/pppd/plugins/minconn.so
%attr(755,root,root) %{_libdir}/pppd/plugins/openl2tp.so
-%attr(755,root,root) %{_libdir}/pppd/plugins/pppol2tp.so
%attr(755,root,root) %{_libdir}/pppd/plugins/passprompt.so
%attr(755,root,root) %{_libdir}/pppd/plugins/passwordfd.so
-%attr(755,root,root) %{_libdir}/pppd/plugins/rp-pppoe.so
+%attr(755,root,root) %{_libdir}/pppd/plugins/pppoe.so
+%attr(755,root,root) %{_libdir}/pppd/plugins/pppol2tp.so
%attr(755,root,root) %{_libdir}/pppd/plugins/radattr.so
%attr(755,root,root) %{_libdir}/pppd/plugins/radius.so
%attr(755,root,root) %{_libdir}/pppd/plugins/radrealms.so
%attr(755,root,root) %{_libdir}/pppd/plugins/winbind.so
-# TODO: legacy, try to drop
-%{_libdir}/pppd/%{version}
-
%{_mandir}/man8/chat.8*
%{_mandir}/man8/pppd.8*
%{_mandir}/man8/pppd-radattr.8*
%{_mandir}/man8/pppd-radius.8*
%{_mandir}/man8/pppdump.8*
+%{_mandir}/man8/pppoe-discovery.8*
%{_mandir}/man8/pppstats.8*
%lang(fr) %{_mandir}/fr/man8/*
%lang(ja) %{_mandir}/ja/man8/*
%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/chap-secrets
%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/pap-secrets
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/eaptls-client
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/eaptls-server
+%attr(600,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/openssl.cnf
%config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options
%config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ppp/options.ttyXX
%dir %{_sysconfdir}/ppp/peers
%files plugin-devel
%defattr(644,root,root,755)
+%doc PLUGINS
%{_includedir}/pppd
+%{_pkgconfigdir}/pppd.pc
-%if %{with pppoatm}
%files plugin-pppoatm
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/pppd/plugins/pppoatm.so
-%endif