Dominique Leuenberger 2017-10-13 12:06:51 +00:00 committed by Git OBS Bridge
commit 1f5b300e64
3 changed files with 97 additions and 103 deletions

13
pppoe.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=PPPoE
After=network.target
Wants=network.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/sbin/pppoe-start
ExecStop=/usr/sbin/pppoe-stop
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Oct 8 12:26:27 UTC 2017 - ilya@ilya.pp.ua
- Add pppoe.service for run pppoe as client (boo#1060710).
- Refresh pppoe.spec.
- Drop SLE 11 support.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Nov 16 15:51:48 UTC 2016 - 13ilya@gmail.com Wed Nov 16 15:51:48 UTC 2016 - 13ilya@gmail.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package rp-pppoe # spec file for package rp-pppoe
# #
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -12,49 +12,38 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org
# #
%define _name pppoe
# Name: rp-%{_name}
%if 0%{?suse_version} > 1140
%define has_systemd 1
%endif
Name: rp-pppoe
Summary: A PPP Over Ethernet Redirector for PPPD Summary: A PPP Over Ethernet Redirector for PPPD
License: GPL-2.0+ License: GPL-2.0+
Group: Productivity/Networking/PPP Group: Productivity/Networking/PPP
Version: 3.12 Version: 3.12
Release: 0 Release: 0
Source0: https://www.roaringpenguin.com/files/download/%{name}-%{version}.tar.gz Source0: https://www.roaringpenguin.com/files/download/%{name}-%{version}.tar.gz
Source1: pppoe-connect Source1: %{_name}-connect
Source2: pppoe-setup Source2: %{_name}-setup
Source3: pppoe-start Source3: %{_name}-start
Source4: pppoe-status Source4: %{_name}-status
Source5: pppoe-stop Source5: %{_name}-stop
Source6: pppoe-server.service Source6: %{_name}.service
Source7: %{_name}-server.service
Url: https://www.roaringpenguin.com/products/pppoe Url: https://www.roaringpenguin.com/products/pppoe
Patch0: docdir.diff Patch0: docdir.diff
Patch1: nonrfc-modems.diff Patch1: nonrfc-modems.diff
Patch2: release-buildsystem.diff Patch2: release-buildsystem.diff
Patch3: resolve-conf.diff Patch3: resolve-conf.diff
Patch4: rp-pppoe-3.10-config.patch Patch4: %{name}-3.10-config.patch
Patch5: rp-pppoe-3.10-init.patch Patch5: %{name}-3.10-init.patch
Patch6: rp-pppoe-pie.patch Patch6: %{name}-pie.patch
Patch7: strip.diff Patch7: strip.diff
Requires: net-tools Requires: ppp net-tools
Requires: ppp BuildRequires: ppp systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ppp
%if 0%{?has_systemd}
BuildRequires: systemd
%else
PreReq: %insserv_prereq %fillup_prereq
%endif
%description %description
rp-pppoe is a user-space redirector which permits the use of PPPoE %{name} is a user-space redirector which permits the use of PPPoE
(Point-to-Point Protocol Over Ethernet) with Linux. PPPoE is used by (Point-to-Point Protocol Over Ethernet) with Linux. PPPoE is used by
many ADSL service providers. many ADSL service providers.
@ -78,104 +67,89 @@ make %{?_smp_mflags}
%install %install
%make_install -C src %make_install -C src
%if 0%{?has_systemd}
mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}
install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir} install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE2} %{buildroot}%{_sbindir} install -m 0755 %{SOURCE2} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir} install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE4} %{buildroot}%{_sbindir} install -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE5} %{buildroot}%{_sbindir} install -m 0755 %{SOURCE5} %{buildroot}%{_sbindir}
install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/pppoe-server.service install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/%{_name}.service
ln -sf pppoe-stop %{buildroot}%{_sbindir}/adsl-stop install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{_name}-server.service
ln -sf pppoe-start %{buildroot}%{_sbindir}/adsl-start ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{_name}
rm -rf %{buildroot}/etc/ppp/pppoe.conf \ ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{_name}-server
%{buildroot}/etc/rc.d/init.d/pppoe \ ln -sf %{_name}-stop %{buildroot}%{_sbindir}/adsl-stop
ln -sf %{_name}-start %{buildroot}%{_sbindir}/adsl-start
rm -rf %{buildroot}/etc/ppp/%{_name}.conf \
%{buildroot}/etc/rc.d/init.d/%{_name} \
%{buildroot}/etc/init.d %{buildroot}/etc/init.d
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcpppoe-server
%else
%{__ln_s} -f ../../etc/init.d/pppoe %{buildroot}%{_sbindir}/rcpppoe
%endif
%make_install -C gui %make_install -C gui
install -d %{buildroot}%_defaultdocdir/rp-pppoe install -d %{buildroot}%_defaultdocdir/%{name}
mv %{buildroot}/etc/ppp/plugins/README %{buildroot}%_defaultdocdir/rp-pppoe/README.plugins mv %{buildroot}/etc/ppp/plugins/README %{buildroot}%_defaultdocdir/%{name}/README.plugins
%{__rm} -rf %{buildroot}%{_sysconfdir}/ppp/plugins rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins
%if 0%{?has_systemd}
%pre %pre
%service_add_pre pppoe-server.service %service_add_pre %{_name}.service
%service_add_pre %{_name}-server.service
%preun %preun
%service_del_preun pppoe-server.service %service_del_preun %{_name}.service
%else %service_del_preun %{_name}-server.service
%stop_on_removal pppoe
%endif
%post %post
%if 0%{?has_systemd} %service_add_post %{_name}.service
%service_add_post pppoe-server.service %service_add_post %{_name}-server.service
%else
%{fillup_and_insserv pppoe}
%endif
%postun %postun
%if 0%{?has_systemd} %service_del_postun %{_name}.service
%service_del_postun pppoe-server.service %service_del_postun %{_name}-server.service
%else
%restart_on_update pppoe
%{insserv_cleanup}
%endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%dir %_defaultdocdir/rp-pppoe %dir %_defaultdocdir/%{name}
%doc %_defaultdocdir/rp-pppoe/* %doc %_defaultdocdir/%{name}/*
%config(noreplace) /etc/ppp/pppoe-server-options %config(noreplace) /etc/ppp/%{_name}-server-options
%config(noreplace) /etc/ppp/firewall-masq %config(noreplace) /etc/ppp/firewall-masq
%config(noreplace) /etc/ppp/firewall-standalone %config(noreplace) /etc/ppp/firewall-standalone
%{_bindir}/tkpppoe %{_bindir}/tkpppoe
%{_sbindir}/pppoe %{_sbindir}/%{_name}
%{_sbindir}/pppoe-server %{_sbindir}/%{_name}-server
%{_sbindir}/pppoe-sniff %{_sbindir}/%{_name}-sniff
%{_sbindir}/pppoe-relay %{_sbindir}/%{_name}-relay
%{_sbindir}/pppoe-connect %{_sbindir}/%{_name}-connect
%{_sbindir}/pppoe-start %{_sbindir}/%{_name}-start
%{_sbindir}/pppoe-stop %{_sbindir}/%{_name}-stop
%{_sbindir}/pppoe-setup %{_sbindir}/%{_name}-setup
%{_sbindir}/pppoe-status %{_sbindir}/%{_name}-status
%attr (4750,root,dialout) %{_sbindir}/pppoe-wrapper %attr (4750,root,dialout) %{_sbindir}/%{_name}-wrapper
%{_mandir}/man5/pppoe.conf.5* %{_mandir}/man5/%{_name}.conf.5*
%{_mandir}/man8/pppoe.8* %{_mandir}/man8/%{_name}.8*
%{_mandir}/man8/pppoe-server.8* %{_mandir}/man8/%{_name}-server.8*
%{_mandir}/man8/pppoe-relay.8* %{_mandir}/man8/%{_name}-relay.8*
%{_mandir}/man8/pppoe-sniff.8* %{_mandir}/man8/%{_name}-sniff.8*
%{_mandir}/man8/pppoe-connect.8* %{_mandir}/man8/%{_name}-connect.8*
%{_mandir}/man8/pppoe-start.8* %{_mandir}/man8/%{_name}-start.8*
%{_mandir}/man8/pppoe-stop.8* %{_mandir}/man8/%{_name}-stop.8*
%{_mandir}/man8/pppoe-status.8* %{_mandir}/man8/%{_name}-status.8*
%{_mandir}/man8/pppoe-setup.8* %{_mandir}/man8/%{_name}-setup.8*
%if 0%{?has_systemd}
%{_sbindir}/adsl-start %{_sbindir}/adsl-start
%{_sbindir}/adsl-stop %{_sbindir}/adsl-stop
%{_sbindir}/rcpppoe-server %{_sbindir}/rc%{_name}
%{_unitdir}/pppoe-server.service %{_sbindir}/rc%{_name}-server
%else %{_unitdir}/%{_name}.service
/etc/init.d/pppoe %{_unitdir}/%{_name}-server.service
%{_sbindir}/rcpppoe %dir /etc/ppp/%{name}-gui
%config(noreplace) /etc/ppp/pppoe.conf %{_mandir}/man1/tk%{_name}.1*
%endif %{_mandir}/man1/%{_name}-wrapper.1*
%dir /etc/ppp/rp-pppoe-gui %dir %{_datarootdir}/tk%{_name}
%{_mandir}/man1/tkpppoe.1* %{_datarootdir}/tk%{_name}/tk%{_name}.html
%{_mandir}/man1/pppoe-wrapper.1* %{_datarootdir}/tk%{_name}/mainwin-busy.png
%dir /usr/share/tkpppoe %{_datarootdir}/tk%{_name}/mainwin-nonroot.png
/usr/share/tkpppoe/tkpppoe.html %{_datarootdir}/tk%{_name}/mainwin.png
/usr/share/tkpppoe/mainwin-busy.png %{_datarootdir}/tk%{_name}/props-advanced.png
/usr/share/tkpppoe/mainwin-nonroot.png %{_datarootdir}/tk%{_name}/props-basic.png
/usr/share/tkpppoe/mainwin.png %{_datarootdir}/tk%{_name}/props-nic.png
/usr/share/tkpppoe/props-advanced.png %{_datarootdir}/tk%{_name}/props-options.png
/usr/share/tkpppoe/props-basic.png %{_datarootdir}/tk%{_name}/en.msg
/usr/share/tkpppoe/props-nic.png %{_datarootdir}/tk%{_name}/ja.msg
/usr/share/tkpppoe/props-options.png
/usr/share/tkpppoe/en.msg
/usr/share/tkpppoe/ja.msg
%changelog %changelog