new package: rp-pppoe (#8479)

This commit is contained in:
xtkoba 2022-01-08 01:57:21 +09:00 committed by GitHub
parent d537b7924e
commit 65c8ddf466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,14 @@
TERMUX_PKG_HOMEPAGE=https://dianne.skoll.ca/projects/rp-pppoe/
TERMUX_PKG_DESCRIPTION="A PPP-over-Ethernet redirector for pppd"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.15
#TERMUX_PKG_SRCURL=https://dianne.skoll.ca/projects/rp-pppoe/download/rp-pppoe-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/rp-pppoe-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b1f318bc7e4e5b0fd8a8e23e8803f5e6e43165245a5a10a7162a92a6cf17829a
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/src
TERMUX_PKG_BUILDDIR=$TERMUX_PKG_SRCDIR
}

View File

@ -0,0 +1,53 @@
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -50,11 +50,11 @@
@LIC_MAKEFILE_INCLUDE@
# Kernel-mode plugin gets installed here.
-PLUGIN_DIR=/etc/ppp/plugins
+PLUGIN_DIR=@TERMUX_PREFIX@/etc/ppp/plugins
PLUGIN_PATH=$(PLUGIN_DIR)/rp-pppoe.so
# Configuration file paths
-PPPOESERVER_PPPD_OPTIONS=/etc/ppp/pppoe-server-options
+PPPOESERVER_PPPD_OPTIONS=@TERMUX_PREFIX@/etc/ppp/pppoe-server-options
PATHS='-DPPPOE_PATH="$(PPPOE_PATH)"' '-DPPPD_PATH="$(PPPD_PATH)"' \
'-DPLUGIN_PATH="$(PLUGIN_PATH)"' \
@@ -188,16 +188,16 @@
$(install) -m 644 ../man/pppoe-setup.8 $(DESTDIR)$(mandir)/man8
-mkdir -p $(DESTDIR)$(mandir)/man5
$(install) -m 644 ../man/pppoe.conf.5 $(DESTDIR)$(mandir)/man5
- -mkdir -p $(DESTDIR)/etc/ppp
+ -mkdir -p $(DESTDIR)@TERMUX_PREFIX@/etc/ppp
-mkdir -p $(DESTDIR)$(PLUGIN_DIR)
-echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(DESTDIR)$(PLUGIN_DIR)/README
if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(DESTDIR)$(PLUGIN_DIR); fi
@for i in pppoe.conf firewall-standalone firewall-masq ; do \
- if [ ! -f $(DESTDIR)/etc/ppp/$$i ] ; then \
- $(install) -m 644 ../configs/$$i $(DESTDIR)/etc/ppp ; \
+ if [ ! -f $(DESTDIR)@TERMUX_PREFIX@/etc/ppp/$$i ] ; then \
+ $(install) -m 644 ../configs/$$i $(DESTDIR)@TERMUX_PREFIX@/etc/ppp ; \
else \
- echo "NOT overwriting existing $(DESTDIR)/etc/ppp/$$i" ;\
- $(install) -m 644 ../configs/$$i $(DESTDIR)/etc/ppp/$$i-$(RP_VERSION) ;\
+ echo "NOT overwriting existing $(DESTDIR)@TERMUX_PREFIX@/etc/ppp/$$i" ;\
+ $(install) -m 644 ../configs/$$i $(DESTDIR)@TERMUX_PREFIX@/etc/ppp/$$i-$(RP_VERSION) ;\
fi ;\
done
@if [ ! -f $(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \
@@ -206,12 +206,12 @@
echo "NOT overwriting existing $(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)"; \
$(install) -m 644 ../configs/pppoe-server-options $(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)-example ; \
fi
- @if [ -f /etc/redhat-release ] ; then \
+ @if false ; then \
echo "Looks like a Red Hat system; installing $(DESTDIR)/etc/rc.d/init.d/pppoe" ; \
mkdir -p $(DESTDIR)/etc/rc.d/init.d ;\
$(install) -m 755 ../scripts/pppoe-init $(DESTDIR)/etc/rc.d/init.d/pppoe ; \
fi
- @if [ -f /etc/SuSE-release ] ; then \
+ @if false ; then \
echo "Looks like a SuSE Linux system; installing $(DESTDIR)/etc/rc.d/init.d/pppoe" ; \
mkdir -p $(DESTDIR)/etc/rc.d/init.d ;\
$(install) -m 755 ../scripts/pppoe-init-suse $(DESTDIR)/etc/rc.d/init.d/pppoe ; \