summaryrefslogtreecommitdiff
path: root/package/rp-pppoe
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/rp-pppoe
Initial import
Diffstat (limited to 'package/rp-pppoe')
-rw-r--r--package/rp-pppoe/Config.in50
-rw-r--r--package/rp-pppoe/Makefile60
-rw-r--r--package/rp-pppoe/files/pppoe-client.init26
-rw-r--r--package/rp-pppoe/files/pppoe-relay.init26
-rw-r--r--package/rp-pppoe/files/pppoe-server.init26
-rw-r--r--package/rp-pppoe/ipkg/pppoe-client.conffiles1
-rw-r--r--package/rp-pppoe/ipkg/pppoe-client.control5
-rw-r--r--package/rp-pppoe/ipkg/pppoe-client.postinst3
-rw-r--r--package/rp-pppoe/ipkg/pppoe-relay.control4
-rw-r--r--package/rp-pppoe/ipkg/pppoe-relay.postinst5
-rw-r--r--package/rp-pppoe/ipkg/pppoe-server.conffiles1
-rw-r--r--package/rp-pppoe/ipkg/pppoe-server.control5
-rw-r--r--package/rp-pppoe/ipkg/pppoe-sniff.control4
-rw-r--r--package/rp-pppoe/ipkg/rules169
-rw-r--r--package/rp-pppoe/ipkg/version1
-rw-r--r--package/rp-pppoe/patches/patch-src_configure12
16 files changed, 398 insertions, 0 deletions
diff --git a/package/rp-pppoe/Config.in b/package/rp-pppoe/Config.in
new file mode 100644
index 000000000..439d582ee
--- /dev/null
+++ b/package/rp-pppoe/Config.in
@@ -0,0 +1,50 @@
+#menu "rp-pppoe.......................... Roaring Penguin PPPoE (PPP over Ethernet) implementation"
+
+config ADK_COMPILE_RP_PPPOE
+ tristate
+ default n
+ depends ADK_PACKAGE_PPPOE_CLIENT || ADK_PACKAGE_PPPOE_RELAY || ADK_PACKAGE_PPPOE_SERVER || ADK_PACKAGE_PPPOE_SNIFF
+
+config ADK_PACKAGE_PPPOE_CLIENT
+ prompt "pppoe-client...................... PPPoE (PPP over Ethernet) client"
+ tristate
+ default n
+ select ADK_COMPILE_RP_PPPOE
+ select ADK_PACKAGE_PPP
+ help
+ PPPoE (PPP over Ethernet) client
+
+ http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
+
+config ADK_PACKAGE_PPPOE_RELAY
+ prompt "pppoe-relay....................... PPPoE (PPP over Ethernet) relay"
+ tristate
+ default n
+ select ADK_COMPILE_RP_PPPOE
+ help
+ PPPoE (PPP over Ethernet) relay
+
+ http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
+
+config ADK_PACKAGE_PPPOE_SERVER
+ prompt "pppoe-server...................... PPPoE (PPP over Ethernet) server"
+ tristate
+ default n
+ select ADK_COMPILE_RP_PPPOE
+ select ADK_PACKAGE_PPP
+ help
+ PPPoE (PPP over Ethernet) server
+
+ http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
+
+config ADK_PACKAGE_PPPOE_SNIFF
+ prompt "pppoe-sniff....................... PPPoE (PPP over Ethernet) frame sniffer"
+ tristate
+ default n
+ select ADK_COMPILE_RP_PPPOE
+ help
+ PPPoE (PPP over Ethernet) frame sniffer
+
+ http://roaringpenguin.com/penguin/open_source_rp-pppoe.php
+
+#endmenu
diff --git a/package/rp-pppoe/Makefile b/package/rp-pppoe/Makefile
new file mode 100644
index 000000000..322d1b7e4
--- /dev/null
+++ b/package/rp-pppoe/Makefile
@@ -0,0 +1,60 @@
+# $Id$
+#-
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+PKG_NAME:= rp-pppoe
+PKG_VERSION:= 3.10
+PKG_RELEASE:= 1
+PKG_MD5SUM:= d58a13cc4185bca6121a606ff456dec0
+MASTER_SITES:= http://www.roaringpenguin.com/files/download/
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,PPPOE_CLIENT,pppoe-client,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,PPPOE_RELAY,pppoe-relay,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,PPPOE_SERVER,pppoe-server,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+$(eval $(call PKG_template,PPPOE_SNIFF,pppoe-sniff,${PKG_VERSION}-${PKG_RELEASE},${ARCH}))
+
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ENV+= ac_cv_func_setvbuf_reversed=no \
+ ac_cv_sizeof_unsigned_short=2 \
+ ac_cv_sizeof_unsigned_int=4 \
+ ac_cv_sizeof_unsigned_long=4 \
+ ac_cv_linux_kernel_pppoe=yes \
+ ac_cv_pack_bitfields_reversed=yes
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+WRKSRC:= ${WRKDIST}/src
+
+post-install:
+ ${INSTALL_DIR} ${IDIR_PPPOE_CLIENT}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_PPPOE_CLIENT}/etc/ppp
+ ${INSTALL_DIR} ${IDIR_PPPOE_CLIENT}/usr/sbin
+ ${INSTALL_BIN} ./files/pppoe-client.init \
+ ${IDIR_PPPOE_CLIENT}/etc/init.d/pppoe-client
+ ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe.conf ${IDIR_PPPOE_CLIENT}/etc/ppp
+ ${CP} ${WRKINST}/usr/sbin/pppoe ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${CP} ${WRKINST}/usr/sbin/pppoe-connect ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${CP} ${WRKINST}/usr/sbin/pppoe-start ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${CP} ${WRKINST}/usr/sbin/pppoe-stop ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${CP} ${WRKINST}/usr/sbin/pppoe-status ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${CP} ${WRKINST}/usr/sbin/pppoe-setup ${IDIR_PPPOE_CLIENT}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_PPPOE_RELAY}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_PPPOE_RELAY}/usr/sbin
+ ${INSTALL_BIN} ./files/pppoe-relay.init \
+ ${IDIR_PPPOE_RELAY}/etc/init.d/pppoe-relay
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-relay ${IDIR_PPPOE_RELAY}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_PPPOE_SERVER}/etc/init.d
+ ${INSTALL_DIR} ${IDIR_PPPOE_SERVER}/etc/ppp
+ ${INSTALL_DIR} ${IDIR_PPPOE_SERVER}/usr/sbin
+ ${INSTALL_BIN} ./files/pppoe-server.init \
+ ${IDIR_PPPOE_SERVER}/etc/init.d/pppoe-server
+ ${INSTALL_DATA} ${WRKINST}/etc/ppp/pppoe-server-options ${IDIR_PPPOE_SERVER}/etc/ppp/
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-server ${IDIR_PPPOE_SERVER}/usr/sbin/
+ ${INSTALL_DIR} ${IDIR_PPPOE_SNIFF}/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/pppoe-sniff ${IDIR_PPPOE_SNIFF}/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rp-pppoe/files/pppoe-client.init b/package/rp-pppoe/files/pppoe-client.init
new file mode 100644
index 000000000..79663eca3
--- /dev/null
+++ b/package/rp-pppoe/files/pppoe-client.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 50
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pppoe_client:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ adsl-start
+ ;;
+stop)
+ adsl-stop
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/rp-pppoe/files/pppoe-relay.init b/package/rp-pppoe/files/pppoe-relay.init
new file mode 100644
index 000000000..0f340020a
--- /dev/null
+++ b/package/rp-pppoe/files/pppoe-relay.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 50
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pppoe_relay:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ pppoe-relay $pppoe_relay_flags
+ ;;
+stop)
+ killall pppoe-relay
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/rp-pppoe/files/pppoe-server.init b/package/rp-pppoe/files/pppoe-server.init
new file mode 100644
index 000000000..4696a5745
--- /dev/null
+++ b/package/rp-pppoe/files/pppoe-server.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#FWINIT 50
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pppoe_server:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ pppoe-server
+ ;;
+stop)
+ killall pppoe-server
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/rp-pppoe/ipkg/pppoe-client.conffiles b/package/rp-pppoe/ipkg/pppoe-client.conffiles
new file mode 100644
index 000000000..7cf395925
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-client.conffiles
@@ -0,0 +1 @@
+/etc/ppp/pppoe.conf
diff --git a/package/rp-pppoe/ipkg/pppoe-client.control b/package/rp-pppoe/ipkg/pppoe-client.control
new file mode 100644
index 000000000..dd64953c3
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-client.control
@@ -0,0 +1,5 @@
+Package: pppoe-client
+Priority: optional
+Section: net
+Description: PPPoE (PPP over Ethernet) client
+Depends: ppp
diff --git a/package/rp-pppoe/ipkg/pppoe-client.postinst b/package/rp-pppoe/ipkg/pppoe-client.postinst
new file mode 100644
index 000000000..2fd0db891
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-client.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pppoe_client pppoe_client NO
diff --git a/package/rp-pppoe/ipkg/pppoe-relay.control b/package/rp-pppoe/ipkg/pppoe-relay.control
new file mode 100644
index 000000000..de64b0bec
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-relay.control
@@ -0,0 +1,4 @@
+Package: pppoe-relay
+Priority: optional
+Section: net
+Description: PPPoE (PPP over Ethernet) relay
diff --git a/package/rp-pppoe/ipkg/pppoe-relay.postinst b/package/rp-pppoe/ipkg/pppoe-relay.postinst
new file mode 100644
index 000000000..2a727ec96
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-relay.postinst
@@ -0,0 +1,5 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pppoe_relay pppoe_relay NO
+add_rcconf pppoe_relay_flags pppoe_relay_flags "-C eth2 -S vlan1"
+
diff --git a/package/rp-pppoe/ipkg/pppoe-server.conffiles b/package/rp-pppoe/ipkg/pppoe-server.conffiles
new file mode 100644
index 000000000..438de2c2c
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-server.conffiles
@@ -0,0 +1 @@
+/etc/ppp/pppoe-server-options
diff --git a/package/rp-pppoe/ipkg/pppoe-server.control b/package/rp-pppoe/ipkg/pppoe-server.control
new file mode 100644
index 000000000..530017b96
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-server.control
@@ -0,0 +1,5 @@
+Package: pppoe-server
+Priority: optional
+Section: net
+Description: PPPoE (PPP over Ethernet) server
+Depends: ppp
diff --git a/package/rp-pppoe/ipkg/pppoe-sniff.control b/package/rp-pppoe/ipkg/pppoe-sniff.control
new file mode 100644
index 000000000..df7b95cf2
--- /dev/null
+++ b/package/rp-pppoe/ipkg/pppoe-sniff.control
@@ -0,0 +1,4 @@
+Package: pppoe-sniff
+Priority: optional
+Section: net
+Description: PPPoE (PPP over Ethernet) frame sniffer
diff --git a/package/rp-pppoe/ipkg/rules b/package/rp-pppoe/ipkg/rules
new file mode 100644
index 000000000..cfb76b088
--- /dev/null
+++ b/package/rp-pppoe/ipkg/rules
@@ -0,0 +1,169 @@
+#!/usr/bin/make -f
+
+ifneq ($(strip ${IPKG_RULES_INC}),)
+ include $(IPKG_RULES_INC)
+endif
+
+##
+
+PKG_VERSION := $(shell cat ./ipkg/version)
+CURRENT_DIR := $(shell pwd)
+INSTALL_DIR ?= $(CURRENT_DIR)/ipkg-install
+
+unexport INSTALL_DIR
+
+I_PPPOE_SERVER := ipkg/pppoe-server
+I_PPPOE_RELAY := ipkg/pppoe-relay
+I_PPPOE_SNIFF := ipkg/pppoe-sniff
+I_PPPOE_CLIENT := ipkg/pppoe-client
+
+BUILD_DEPS = \
+
+CONFIGURE_OPTS = \
+
+##
+
+all: package
+
+
+.stamp-configured: $(BUILD_DEPS)
+
+ cd src ; \
+ rm -rf config.cache ; \
+ $(TARGET_CONFIGURE_OPTS) \
+ ac_cv_func_setvbuf_reversed=no \
+ ac_cv_sizeof_unsigned_short=2 \
+ ac_cv_sizeof_unsigned_int=4 \
+ ac_cv_sizeof_unsigned_long=4 \
+ ac_cv_linux_kernel_pppoe=yes \
+ ac_cv_pack_bitfields_reversed=yes \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --includedir=/usr/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc \
+ --disable-nls \
+ $(CONFIGURE_OPTS) \
+
+ touch .stamp-configured
+
+
+.stamp-built: .stamp-configured
+
+ $(MAKE) -C src \
+ $(TARGET_CONFIGURE_OPTS) \
+
+ touch .stamp-built
+
+
+$(INSTALL_DIR)/usr/sbin/pppoe: .stamp-built
+
+ mkdir -p $(INSTALL_DIR)
+
+ $(MAKE) -C src \
+ DESTDIR="$(INSTALL_DIR)" \
+ install
+
+
+configure: .stamp-configured
+
+
+build: .stamp-built
+
+
+install: $(INSTALL_DIR)/usr/sbin/pppoe
+
+
+package: $(INSTALL_DIR)/usr/sbin/pppoe
+
+ mkdir -p $(I_PPPOE_SERVER)/etc/ppp
+ cp -fpR $(INSTALL_DIR)/etc/ppp/pppoe-server-options $(I_PPPOE_SERVER)/etc/ppp/
+ mkdir -p $(I_PPPOE_SERVER)/usr/sbin
+ cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-server $(I_PPPOE_SERVER)/usr/sbin/
+ $(STRIP) $(I_PPPOE_SERVER)/usr/sbin/*
+
+ mkdir -p $(I_PPPOE_RELAY)/usr/sbin
+ cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-relay $(I_PPPOE_RELAY)/usr/sbin/
+ $(STRIP) $(I_PPPOE_RELAY)/usr/sbin/*
+
+ mkdir -p $(I_PPPOE_SNIFF)/usr/sbin
+ cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe-sniff $(I_PPPOE_SNIFF)/usr/sbin/
+ $(STRIP) $(I_PPPOE_SNIFF)/usr/sbin/*
+
+ mkdir -p $(I_PPPOE_CLIENT)/etc
+ cp -fpR $(INSTALL_DIR)/etc/pppoe.conf $(I_PPPOE_CLIENT)/etc/
+ mkdir -p $(I_PPPOE_CLIENT)/usr/sbin
+ cp -fpR $(INSTALL_DIR)/usr/sbin/pppoe $(I_PPPOE_CLIENT)/usr/sbin/
+ $(STRIP) $(I_PPPOE_CLIENT)/usr/sbin/*
+ cp -fpR $(INSTALL_DIR)/usr/sbin/adsl-* $(I_PPPOE_CLIENT)/usr/sbin/
+
+ chmod 0755 ipkg/*/etc/
+ chmod 0755 ipkg/*/etc/default/
+ chmod 0644 ipkg/*/etc/default/*
+ chmod 0755 ipkg/*/etc/init.d/
+ chmod 0755 ipkg/*/etc/init.d/*
+
+ chmod 0755 ipkg/*/CONTROL/
+ chmod 0644 ipkg/*/CONTROL/control
+ -chmod 0644 ipkg/*/CONTROL/conffiles
+
+ perl -pi -e "s/^Arch.*:.*/Architecture: $(ARCH)/g" ipkg/*/CONTROL/control
+ifneq ($(strip $(PKG_VERSION)),)
+ perl -pi -e "s/^Vers.*:.*/Version: $(PKG_VERSION)/g" ipkg/*/CONTROL/control
+endif
+
+ $(IPKG_BUILD) $(I_PPPOE_SERVER) $(IPKG_TARGET_DIR)
+ $(IPKG_BUILD) $(I_PPPOE_RELAY) $(IPKG_TARGET_DIR)
+ $(IPKG_BUILD) $(I_PPPOE_SNIFF) $(IPKG_TARGET_DIR)
+ $(IPKG_BUILD) $(I_PPPOE_CLIENT) $(IPKG_TARGET_DIR)
+
+
+clean:
+
+ -$(MAKE) -C src \
+ clean
+
+ rm -rf .stamp-* \
+ $(INSTALL_DIR)/etc/pppoe.conf \
+ $(INSTALL_DIR)/etc/ppp/pppoe-server-options \
+ $(INSTALL_DIR)/usr/doc/rp-pppoe* \
+ $(INSTALL_DIR)/usr/sbin/adsl-* \
+ $(INSTALL_DIR)/usr/sbin/pppoe* \
+ $(INSTALL_DIR)/usr/share/man/man5/pppoe.conf.5* \
+ $(INSTALL_DIR)/usr/share/man/man8/adsl-*.8* \
+ $(INSTALL_DIR)/usr/share/man/man8/pppoe*.8* \
+ $(I_PPPOE_SERVER)/etc/ppp \
+ $(I_PPPOE_SERVER)/usr \
+ $(I_PPPOE_RELAY)/usr \
+ $(I_PPPOE_SNIFF)/usr \
+ $(I_PPPOE_CLIENT)/etc/ppp* \
+ $(I_PPPOE_CLIENT)/usr \
+
+
+control:
+
+ @cat $(I_PPPOE_SERVER)/CONTROL/control
+ @echo
+ @cat $(I_PPPOE_RELAY)/CONTROL/control
+ @echo
+ @cat $(I_PPPOE_SNIFF)/CONTROL/control
+ @echo
+ @cat $(I_PPPOE_CLIENT)/CONTROL/control
+ @echo
+
+
+.PHONY: configure build install package clean control
diff --git a/package/rp-pppoe/ipkg/version b/package/rp-pppoe/ipkg/version
new file mode 100644
index 000000000..99d9948ce
--- /dev/null
+++ b/package/rp-pppoe/ipkg/version
@@ -0,0 +1 @@
+3.5-4
diff --git a/package/rp-pppoe/patches/patch-src_configure b/package/rp-pppoe/patches/patch-src_configure
new file mode 100644
index 000000000..e87afc7d7
--- /dev/null
+++ b/package/rp-pppoe/patches/patch-src_configure
@@ -0,0 +1,12 @@
+$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+--- rp-pppoe-3.10.orig/src/configure 2008-06-30 16:00:42.000000000 +0200
++++ rp-pppoe-3.10/src/configure 2008-10-30 13:04:54.000000000 +0100
+@@ -6272,7 +6272,7 @@ esac
+ { echo "$as_me:$LINENO: checking packing order of bit fields" >&5
+ echo $ECHO_N "checking packing order of bit fields... $ECHO_C" >&6; }
+ if test "$cross_compiling" = yes; then
+- $ECHO "no defaults for cross-compiling"; exit 0
++ $ECHO "no defaults for cross-compiling"
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */