SHA256
1
0
forked from pool/rp-pppoe
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

View File

@ -1,7 +1,7 @@
#
# 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
# 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)
# 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
#
#
%if 0%{?suse_version} > 1140
%define has_systemd 1
%endif
Name: rp-pppoe
%define _name pppoe
Name: rp-%{_name}
Summary: A PPP Over Ethernet Redirector for PPPD
License: GPL-2.0+
Group: Productivity/Networking/PPP
Version: 3.12
Release: 0
Source0: https://www.roaringpenguin.com/files/download/%{name}-%{version}.tar.gz
Source1: pppoe-connect
Source2: pppoe-setup
Source3: pppoe-start
Source4: pppoe-status
Source5: pppoe-stop
Source6: pppoe-server.service
Source1: %{_name}-connect
Source2: %{_name}-setup
Source3: %{_name}-start
Source4: %{_name}-status
Source5: %{_name}-stop
Source6: %{_name}.service
Source7: %{_name}-server.service
Url: https://www.roaringpenguin.com/products/pppoe
Patch0: docdir.diff
Patch1: nonrfc-modems.diff
Patch2: release-buildsystem.diff
Patch3: resolve-conf.diff
Patch4: rp-pppoe-3.10-config.patch
Patch5: rp-pppoe-3.10-init.patch
Patch6: rp-pppoe-pie.patch
Patch4: %{name}-3.10-config.patch
Patch5: %{name}-3.10-init.patch
Patch6: %{name}-pie.patch
Patch7: strip.diff
Requires: net-tools
Requires: ppp
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ppp
%if 0%{?has_systemd}
BuildRequires: systemd
%else
PreReq: %insserv_prereq %fillup_prereq
%endif
Requires: ppp net-tools
BuildRequires: ppp systemd
%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
many ADSL service providers.
@ -78,104 +67,89 @@ make %{?_smp_mflags}
%install
%make_install -C src
%if 0%{?has_systemd}
mkdir -p %{buildroot}%{_sbindir} %{buildroot}%{_unitdir}
install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE2} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE3} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}
install -m 0755 %{SOURCE5} %{buildroot}%{_sbindir}
install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/pppoe-server.service
ln -sf pppoe-stop %{buildroot}%{_sbindir}/adsl-stop
ln -sf pppoe-start %{buildroot}%{_sbindir}/adsl-start
rm -rf %{buildroot}/etc/ppp/pppoe.conf \
%{buildroot}/etc/rc.d/init.d/pppoe \
install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/%{_name}.service
install -m 0644 %{SOURCE7} %{buildroot}%{_unitdir}/%{_name}-server.service
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{_name}
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{_name}-server
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
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
install -d %{buildroot}%_defaultdocdir/rp-pppoe
mv %{buildroot}/etc/ppp/plugins/README %{buildroot}%_defaultdocdir/rp-pppoe/README.plugins
%{__rm} -rf %{buildroot}%{_sysconfdir}/ppp/plugins
install -d %{buildroot}%_defaultdocdir/%{name}
mv %{buildroot}/etc/ppp/plugins/README %{buildroot}%_defaultdocdir/%{name}/README.plugins
rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins
%if 0%{?has_systemd}
%pre
%service_add_pre pppoe-server.service
%service_add_pre %{_name}.service
%service_add_pre %{_name}-server.service
%preun
%service_del_preun pppoe-server.service
%else
%stop_on_removal pppoe
%endif
%service_del_preun %{_name}.service
%service_del_preun %{_name}-server.service
%post
%if 0%{?has_systemd}
%service_add_post pppoe-server.service
%else
%{fillup_and_insserv pppoe}
%endif
%service_add_post %{_name}.service
%service_add_post %{_name}-server.service
%postun
%if 0%{?has_systemd}
%service_del_postun pppoe-server.service
%else
%restart_on_update pppoe
%{insserv_cleanup}
%endif
%service_del_postun %{_name}.service
%service_del_postun %{_name}-server.service
%files
%defattr(-,root,root)
%dir %_defaultdocdir/rp-pppoe
%doc %_defaultdocdir/rp-pppoe/*
%config(noreplace) /etc/ppp/pppoe-server-options
%dir %_defaultdocdir/%{name}
%doc %_defaultdocdir/%{name}/*
%config(noreplace) /etc/ppp/%{_name}-server-options
%config(noreplace) /etc/ppp/firewall-masq
%config(noreplace) /etc/ppp/firewall-standalone
%{_bindir}/tkpppoe
%{_sbindir}/pppoe
%{_sbindir}/pppoe-server
%{_sbindir}/pppoe-sniff
%{_sbindir}/pppoe-relay
%{_sbindir}/pppoe-connect
%{_sbindir}/pppoe-start
%{_sbindir}/pppoe-stop
%{_sbindir}/pppoe-setup
%{_sbindir}/pppoe-status
%attr (4750,root,dialout) %{_sbindir}/pppoe-wrapper
%{_mandir}/man5/pppoe.conf.5*
%{_mandir}/man8/pppoe.8*
%{_mandir}/man8/pppoe-server.8*
%{_mandir}/man8/pppoe-relay.8*
%{_mandir}/man8/pppoe-sniff.8*
%{_mandir}/man8/pppoe-connect.8*
%{_mandir}/man8/pppoe-start.8*
%{_mandir}/man8/pppoe-stop.8*
%{_mandir}/man8/pppoe-status.8*
%{_mandir}/man8/pppoe-setup.8*
%if 0%{?has_systemd}
%{_sbindir}/%{_name}
%{_sbindir}/%{_name}-server
%{_sbindir}/%{_name}-sniff
%{_sbindir}/%{_name}-relay
%{_sbindir}/%{_name}-connect
%{_sbindir}/%{_name}-start
%{_sbindir}/%{_name}-stop
%{_sbindir}/%{_name}-setup
%{_sbindir}/%{_name}-status
%attr (4750,root,dialout) %{_sbindir}/%{_name}-wrapper
%{_mandir}/man5/%{_name}.conf.5*
%{_mandir}/man8/%{_name}.8*
%{_mandir}/man8/%{_name}-server.8*
%{_mandir}/man8/%{_name}-relay.8*
%{_mandir}/man8/%{_name}-sniff.8*
%{_mandir}/man8/%{_name}-connect.8*
%{_mandir}/man8/%{_name}-start.8*
%{_mandir}/man8/%{_name}-stop.8*
%{_mandir}/man8/%{_name}-status.8*
%{_mandir}/man8/%{_name}-setup.8*
%{_sbindir}/adsl-start
%{_sbindir}/adsl-stop
%{_sbindir}/rcpppoe-server
%{_unitdir}/pppoe-server.service
%else
/etc/init.d/pppoe
%{_sbindir}/rcpppoe
%config(noreplace) /etc/ppp/pppoe.conf
%endif
%dir /etc/ppp/rp-pppoe-gui
%{_mandir}/man1/tkpppoe.1*
%{_mandir}/man1/pppoe-wrapper.1*
%dir /usr/share/tkpppoe
/usr/share/tkpppoe/tkpppoe.html
/usr/share/tkpppoe/mainwin-busy.png
/usr/share/tkpppoe/mainwin-nonroot.png
/usr/share/tkpppoe/mainwin.png
/usr/share/tkpppoe/props-advanced.png
/usr/share/tkpppoe/props-basic.png
/usr/share/tkpppoe/props-nic.png
/usr/share/tkpppoe/props-options.png
/usr/share/tkpppoe/en.msg
/usr/share/tkpppoe/ja.msg
%{_sbindir}/rc%{_name}
%{_sbindir}/rc%{_name}-server
%{_unitdir}/%{_name}.service
%{_unitdir}/%{_name}-server.service
%dir /etc/ppp/%{name}-gui
%{_mandir}/man1/tk%{_name}.1*
%{_mandir}/man1/%{_name}-wrapper.1*
%dir %{_datarootdir}/tk%{_name}
%{_datarootdir}/tk%{_name}/tk%{_name}.html
%{_datarootdir}/tk%{_name}/mainwin-busy.png
%{_datarootdir}/tk%{_name}/mainwin-nonroot.png
%{_datarootdir}/tk%{_name}/mainwin.png
%{_datarootdir}/tk%{_name}/props-advanced.png
%{_datarootdir}/tk%{_name}/props-basic.png
%{_datarootdir}/tk%{_name}/props-nic.png
%{_datarootdir}/tk%{_name}/props-options.png
%{_datarootdir}/tk%{_name}/en.msg
%{_datarootdir}/tk%{_name}/ja.msg
%changelog