X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mx2.mendoza-conicet.gob.ar (mx2.mendoza-conicet.gob.ar [200.69.149.90]) by mail.alpinelinux.org (Postfix) with ESMTP id 76449DC0095 for ; Tue, 20 Nov 2012 12:55:39 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx2.mendoza-conicet.gob.ar (Postfix) with ESMTP id 3EF48168036F for ; Tue, 20 Nov 2012 09:36:42 -0300 (ART) X-Virus-Scanned: amavisd-new at mx2.mendoza-conicet.gob.ar Received: from mx2.mendoza-conicet.gob.ar ([127.0.0.1]) by localhost (mx2.mendoza-conicet.gob.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wKyRt4e20VaF for ; Tue, 20 Nov 2012 09:36:41 -0300 (ART) Received: from correo.mendoza-conicet.gob.ar (correo.mendoza-conicet.gob.ar [172.16.15.91]) by mx2.mendoza-conicet.gob.ar (Postfix) with ESMTP id 179AD1680355 for ; Tue, 20 Nov 2012 09:36:41 -0300 (ART) Received: from localhost (localhost [127.0.0.1]) by correo.mendoza-conicet.gob.ar (Postfix) with ESMTP id E6EEDABFCAB4 for ; Tue, 20 Nov 2012 09:46:57 -0300 (ART) X-Virus-Scanned: amavisd-new at mendoza-conicet.gob.ar Received: from correo.mendoza-conicet.gob.ar ([127.0.0.1]) by localhost (correo.mendoza-conicet.gob.ar [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4MOlq0I01Aum; Tue, 20 Nov 2012 09:46:56 -0300 (ART) Received: from pcastorino-cct.admin.cricyt.edu.ar (unknown [172.16.18.34]) by correo.mendoza-conicet.gob.ar (Postfix) with ESMTPA id DDD85ABFCAB3; Tue, 20 Nov 2012 09:46:55 -0300 (ART) From: Pablo Castorino To: alpine-devel@lists.alpinelinux.org Cc: Pablo Castorino Subject: [alpine-devel] [PATCH 1/2] ifplugd: new aport Date: Tue, 20 Nov 2012 09:55:19 -0300 Message-Id: <1353416120-12198-1-git-send-email-pcastorino@mendoza-conicet.gob.ar> X-Mailer: git-send-email 1.7.10 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- testing/ifplugd/APKBUILD | 48 +++++++++++++++++++++++++++++++++++++++++ testing/ifplugd/ifplugd.initd | 32 +++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 testing/ifplugd/APKBUILD create mode 100644 testing/ifplugd/ifplugd.initd diff --git a/testing/ifplugd/APKBUILD b/testing/ifplugd/APKBUILD new file mode 100644 index 0000000..8a75dfd --- /dev/null +++ b/testing/ifplugd/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Pablo Castorino +# 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 0000000..c5b8ec5 --- /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 +} -- 1.7.10 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---