aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Castorino <pcastorino@mendoza-conicet.gob.ar>2012-11-20 09:55:19 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2012-11-21 08:57:30 +0000
commite567b0dde77f1220423f02be9b33166c26e175bd (patch)
tree997c9c99b9e09d60d95ce30efdc811774d3306f1
parent2745e5cac8415bd3d38cb4116d552fe05af3a08b (diff)
downloadaports-e567b0dde77f1220423f02be9b33166c26e175bd.tar.bz2
aports-e567b0dde77f1220423f02be9b33166c26e175bd.tar.xz
ifplugd: new aport
-rw-r--r--testing/ifplugd/APKBUILD48
-rw-r--r--testing/ifplugd/ifplugd.initd32
2 files changed, 80 insertions, 0 deletions
diff --git a/testing/ifplugd/APKBUILD b/testing/ifplugd/APKBUILD
new file mode 100644
index 0000000000..8a75dfda81
--- /dev/null
+++ b/testing/ifplugd/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Pablo Castorino <pcastorino@mendoza-conicet.gob.ar>
+# Maintainer:
+pkgname=ifplugd
+pkgver=0.28
+pkgrel=0
+pkgdesc="ifplugd is a Linux daemon which will automatically configure your ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled. This is useful on laptops with onboard network adapters, since it will only configure the interface when a cable is really connected."
+url="http://0pointer.de/lennart/projects/ifplugd"
+arch="all"
+license="GPL2"
+depends="libdaemon"
+depends_dev="libdaemon-dev"
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://0pointer.de/lennart/projects/ifplugd/ifplugd-$pkgver.tar.gz
+ $pkgname.initd"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-lynx \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D "$pkgdir"/etc/init.d/$pkgname "$pkgdir"/usr/sbin/$pkgname-helper
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="df6f4bab52f46ffd6eb1f5912d4ccee3 ifplugd-0.28.tar.gz
+7d7d45d6cf8edcb46ff18bedf7cfb961 ifplugd.initd"
diff --git a/testing/ifplugd/ifplugd.initd b/testing/ifplugd/ifplugd.initd
new file mode 100644
index 0000000000..c5b8ec53d2
--- /dev/null
+++ b/testing/ifplugd/ifplugd.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/quagga/files/ifplugd.init,v 1.2 2007/02/25 09:57:18 mrness Exp $
+
+depend() {
+ need net
+ after firewall opennhrp
+}
+
+checkconfig() {
+ if [ ! -e /etc/ifplugd/ifplugd.conf ] ; then
+ eerror "You need to create /etc/ifplugd/ifplugd.conf first."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ifplugd"
+ sh /usr/sbin/ifplugd-helper start
+ result=$?
+ eend $result
+}
+
+stop() {
+ ebegin "Stopping ifplugd"
+ sh /usr/sbin/ifplugd-helper stop
+ result=$?
+ eend $result
+}