ppp/ppp.spec

262 lines
9.1 KiB
RPMSpec
Raw Normal View History

%define dialout_groupid 10
Name: ppp
Version: 2.5.0
Release: 1mamba
Summary: Point to Point Protocol
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://ppp.samba.org/
Source0: https://download.samba.org/pub/ppp/ppp-%{version}.tar.gz
Source1: ppp-options-atm
Source2: ppp-options
Source3: ppp-ip-up
Source4: ppp-ip-down
Source5: pppoatm-initscript
Source6: pppoatm-start.desktop
Source7: pppoatm-stop.desktop
Source8: ppp-adsl.directory
Source9: ppp-xdg-adsl.menu
Patch0: %{name}-2.4.2-pppoatm.patch
Patch1: %{name}-2.4.3-expect_path.patch
Patch2: %{name}-2.4.3-CVE_2006_2194.patch
Patch3: ppp-2.4.5-enable_ipv6.patch
Patch4: ppp-2.4.5-enable_pam.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libatm-devel
BuildRequires: libopenssl-devel
BuildRequires: libpam-devel
BuildRequires: libpcap-devel
## AUTOBUILDREQ-END
BuildRequires: libpcap-devel >= 1.2
BuildRequires: libatm-devel >= 2.4.1
%description
The ppp package contains the PPP (Point-to-Point Protocol) daemon and documentation for PPP support.
The PPP protocol provides a method for transmitting datagrams over serial point-to-point links.
The ppp package should be installed if your machine needs to support the PPP protocol.
%package devel
Group: Development/Libraries
Summary: x264 development files
Requires: %{name} = %{version}-%{release}
%description devel
The ppp package contains the PPP (Point-to-Point Protocol) daemon and documentation for PPP support.
The PPP protocol provides a method for transmitting datagrams over serial point-to-point links.
This package contains static libraries and header files needed for development.
%debug_package
%prep
%setup -q
#%patch1 -p1
#%patch2 -p1 -b .CVE_2006_2194
#%patch3 -p1
#%patch 4 -p1
#rm -f include/linux/if_pppol2tp.h
#%ifarch x86_64 aarch64
#sed -i "s|/lib/pppd|/%{_lib}/pppd|" pppd/pathnames.h pppd/plugins/Makefile.linux pppd/plugins/*/Makefile.linux
#%endif
%build
%configure \
--with-pam
# --prefix=%{_prefix}
%make CC=%{_target_platform}-gcc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -D -m 0644 %{S:1} %{buildroot}%{_sysconfdir}/ppp/options-atm
install -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/ppp/options
install -m 0755 %{S:3} %{buildroot}%{_sysconfdir}/ppp/ip-up
install -m 0755 %{S:4} %{buildroot}%{_sysconfdir}/ppp/ip-down
#install -D -m 0755 %{S:5} %{buildroot}%{_initrddir}/pppoatm
#sed -i "s/@PPPDVERSION@/%{version}/" %{buildroot}%{_initrddir}/pppoatm
install -m 0755 scripts/ipv6-up.sample %{buildroot}%{_sysconfdir}/ppp/ipv6-up
install -m 0755 scripts/ipv6-down.sample %{buildroot}%{_sysconfdir}/ppp/ipv6-down
install -m 0644 etc.ppp/* %{buildroot}%{_sysconfdir}/ppp/
install -d %{buildroot}%{_datadir}/ppp/scripts
cp -a scripts/* %{buildroot}%{_datadir}/ppp/scripts
install -d %{buildroot}%{_sysconfdir}/ppp/peers
## Install ADSL desktop menu and links
#install -D -m 0644 %{S:6} \
# %{buildroot}%{_datadir}/applications/pppoatm-start.desktop
#install -D -m 0644 %{S:7} \
# %{buildroot}%{_datadir}/applications/pppoatm-stop.desktop
#install -D -m 0644 %{S:8} \
# %{buildroot}%{_datadir}/desktop-directories/adsl.directory
#install -D -m 0644 %{S:9} \
# %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged/adsl.menu
install -d -m0755 %{buildroot}%{_modprobedir}
cat > %{buildroot}%{_modprobedir}/ppp.conf << _EOF
alias ppp0 ppp_generic
_EOF
# FIXME: this script needs perl(Proc::Daemon) and perl(Proc::WaitStat)
rm %{buildroot}%{_datadir}/ppp/scripts/autopppd
# fix wrong permissions
chmod 0755 %{buildroot}%{_sbindir}/pppd
chmod 0755 %{buildroot}%{_sbindir}/pppoe-discovery
chmod 0755 %{buildroot}%{_libdir}/pppd/%{version}/*.so
chmod 0644 %{buildroot}%{_mandir}/man8/*.8*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
groupadd dialout -g %{dialout_groupid} 2>/dev/null
exit 0
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/ppp
%config(noreplace) %attr(0664,root,dialout) %{_sysconfdir}/ppp/options*
%config(noreplace) %attr(0660,root,dialout) %{_sysconfdir}/ppp/chap-secrets
%config(noreplace) %attr(0660,root,dialout) %{_sysconfdir}/ppp/pap-secrets
%config(noreplace) %attr(0664,root,dialout) %{_sysconfdir}/ppp/peers
%config(noreplace) %attr(0664,root,dialout) %{_sysconfdir}/ppp/eaptls-client
%config(noreplace) %attr(0664,root,dialout) %{_sysconfdir}/ppp/eaptls-server
%config(noreplace) %attr(0664,root,dialout) %{_sysconfdir}/ppp/openssl.cnf
%config %{_sysconfdir}/ppp/ip-*
%config %{_sysconfdir}/ppp/ipv6-*
%{_modprobedir}/ppp.conf
%attr(4550,root,dialout) %{_sbindir}/pppd
%{_sbindir}/pppstats
%{_sbindir}/pppdump
%{_sbindir}/chat
%{_sbindir}/pppoe-discovery
%dir %{_datadir}/ppp/scripts
%{_datadir}/ppp/scripts/*
%if "%{_host}" != "%{_build}"
# expect cannot be cross-compiled
%exclude %{_datadir}/ppp/scripts/secure-card
%endif
#%{_initrddir}/pppoatm
%{_libdir}/pppd/%{version}/*.so
%{_mandir}/man8/*
%files devel
%defattr(-,root,root)
%dir %{_includedir}/pppd
%{_includedir}/pppd/*
%{_libdir}/pkgconfig/pppd.pc
%changelog
* Fri May 12 2023 Automatic Build System <autodist@mambasoft.it> 2.5.0-1mamba
- automatic version update by autodist
* Fri Jan 15 2021 Automatic Build System <autodist@mambasoft.it> 2.4.9-1mamba
- automatic version update by autodist
* Sat Apr 18 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.8-1mamba
- update to 2.4.8
* Sun Aug 10 2014 Automatic Build System <autodist@mambasoft.it> 2.4.7-1mamba
- automatic version update by autodist
* Thu Feb 20 2014 Automatic Build System <autodist@mambasoft.it> 2.4.6-1mamba
- automatic version update by autodist
* Wed Jan 02 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.5-5mamba
- enable ipv6 support required by NetworkManager >= 0.9.6
- enable pam support
* Wed Jul 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.5-4mamba
- rebuilt against libpcap 1.2.1
* Tue Dec 20 2011 Davide Madrisan <davide.madrisan@gmail.com> 2.4.5-3mamba
- make pppoatm initscript dash compatible
- fix permissions of several files
* Mon Feb 14 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.5-2mamba
- remove ADSL desktop menu and pppoatm start and stop entries obsoleted by network manager GUI
* Tue Nov 17 2009 Automatic Build System <autodist@mambasoft.it> 2.4.5-1mamba
- automatic update to 2.4.5 by autodist
* Sat Jul 25 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.4-4mamba
- install modprobe file as /etc/modprobe.d/ppp.conf
* Mon Oct 29 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.4-3mamba
- revert PEERDNS to USEPEERDNS to fix pppoatm (must fix pppoe again, now?)
* Fri Oct 05 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.4-2mamba
- ip-up/up-down: substitute reference USEPEERDNS with PEERDNS
* Wed Sep 26 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.4-1mamba
- update to 2.4.4
- remove old code for modules.conf replaced by /etc/modprobe.d/ppp
* Tue Jul 11 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.4.3-4qilnx
- security fix: CVE-2006-2194 (qibug 196)
* Tue Jun 06 2006 Massimo Pintore <massimo.pintore@qilinux.it> 2.4.3-3qilnx
- updated initscript pppoatm
- fixed adsl.directory warning
* Mon May 22 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.4.3-2qilnx
- fixed 'Categories' entry in the desktop files
- added french translation
* Thu May 18 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.3-1qilnx
- update to version 2.4.3 by autospec
- added pppoatm initscript
- added ADSL desktop menu and start/stop entries
* Fri Nov 04 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.4.2-10qilnx
- ip-up script fix
* Thu Nov 03 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.4.2-9qilnx
- ip-up script: prepend to /etc/resolv.conf some information needed by
the dhcp-clienti script
* Fri Sep 23 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-8qilnx
- add devel package
- support for cross platform builds
* Sun Jun 26 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-7qilnx
- fix permissions on some files
* Fri Nov 26 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-6qilnx
- added ip-up and ip-down script for automatic resolv.conf configuration
- added /usr/share/ppp/scripts dir containing a lot of sample scripts
* Tue Aug 17 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-5qilnx
- reverted back to the previous pppoatm patch that seems to be working better
- added /etc/ppp/options-atm default configuration file
* Fri Aug 13 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-4qilnx
- changed pppoatm patch with one supporting ppp 2.4.2
* Wed Aug 11 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-3qilnx
- removed default ppp option lock and added noauth to make kppp work correctly
* Wed Aug 11 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-2qilnx
- added patch for pppoatm plugin
* Thu Mar 25 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.2-1qilnx
- new version build
* Mon Nov 03 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.1-2qilnx
- added configuration files
* Fri Apr 18 2003 Luca Tinelli <luca.tinelli@qinet.it> 2.4.1-1qilnx
- First Build