aboutsummaryrefslogtreecommitdiffstats
path: root/main/rp-pppoe
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-29 06:19:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-29 06:19:34 +0000
commit72c16426eac01b5ad07af6d59f8e8d50c557e1f5 (patch)
tree223fe491d91e955f8931e47c9c425a768f84f9d2 /main/rp-pppoe
parent0ab1df962d59d5ae6f10c9022eb5256fcf5a959d (diff)
downloadaports-72c16426eac01b5ad07af6d59f8e8d50c557e1f5.tar.bz2
aports-72c16426eac01b5ad07af6d59f8e8d50c557e1f5.tar.xz
main/rp-pppoe: moved from testing
Diffstat (limited to 'main/rp-pppoe')
-rw-r--r--main/rp-pppoe/APKBUILD38
-rw-r--r--main/rp-pppoe/rp-pppoe.initd30
2 files changed, 68 insertions, 0 deletions
diff --git a/main/rp-pppoe/APKBUILD b/main/rp-pppoe/APKBUILD
new file mode 100644
index 0000000000..0694c21682
--- /dev/null
+++ b/main/rp-pppoe/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=rp-pppoe
+pkgver=3.10
+pkgrel=4
+pkgdesc="Roaring Penguin\'s Point-to-Point Protocol over Ethernet client"
+url="http://www.roaringpenguin.com/pppoe/"
+arch="all"
+license="LGPL"
+depends=
+makedepends="ppp-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://www.roaringpenguin.com/files/download/rp-pppoe-$pkgver.tar.gz
+ rp-pppoe.initd"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$_builddir"/src
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+
+ make all || return 1
+}
+
+package() {
+ cd "$_builddir"/src
+
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="d58a13cc4185bca6121a606ff456dec0 rp-pppoe-3.10.tar.gz
+851f3a5a2fab28aa3b8999656b565e1c rp-pppoe.initd"
diff --git a/main/rp-pppoe/rp-pppoe.initd b/main/rp-pppoe/rp-pppoe.initd
new file mode 100644
index 0000000000..3e6ce3edba
--- /dev/null
+++ b/main/rp-pppoe/rp-pppoe.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting PPPOE Server"
+ test -x /usr/sbin/pppoe-server -a -f /etc/ppp/pppoe-server-options || exit 0
+ start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping PPPOE Server"
+ start-stop-daemon --stop --exec /usr/sbin/pppoe-server
+ echo 0 > /proc/sys/net/ipv4/ip_forward
+ eend $?
+}
+
+restart () {
+ ebegin "Restarting PPPOE Server"
+ start-stop-daemon --stop --exec /usr/sbin/pppoe-server
+ sleep 1
+ start-stop-daemon --start --exec /usr/sbin/pppoe-server -- ${PPPOE_PARAMS}
+ echo 1 > /proc/sys/net/ipv4/ip_forward
+ echo "."
+}
+