summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2011-10-03 07:09:24 +0000
committerLars Wendler <polynomial-c@gentoo.org>2011-10-03 07:09:24 +0000
commitdab58e2bede893399d1b3b91db57574d9aff4dfe (patch)
treefe5ecd652ff6378c31fb5f49b9edf76bb6698f06 /sys-apps/netplug
parentVersion bump. (diff)
downloadgentoo-2-dab58e2bede893399d1b3b91db57574d9aff4dfe.tar.gz
gentoo-2-dab58e2bede893399d1b3b91db57574d9aff4dfe.tar.bz2
gentoo-2-dab58e2bede893399d1b3b91db57574d9aff4dfe.zip
New maintainer. Version bump. New startup script
(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/netplug')
-rw-r--r--sys-apps/netplug/ChangeLog12
-rwxr-xr-xsys-apps/netplug/files/netplug.243
-rw-r--r--sys-apps/netplug/metadata.xml4
-rw-r--r--sys-apps/netplug/netplug-1.2.9.2.ebuild64
4 files changed, 119 insertions, 4 deletions
diff --git a/sys-apps/netplug/ChangeLog b/sys-apps/netplug/ChangeLog
index 5817aebf6894..1a9914980923 100644
--- a/sys-apps/netplug/ChangeLog
+++ b/sys-apps/netplug/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/netplug
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.22 2010/02/28 18:52:11 volkmar Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/ChangeLog,v 1.23 2011/10/03 07:09:24 polynomial-c Exp $
+
+*netplug-1.2.9.2 (03 Oct 2011)
+
+ 03 Oct 2011; Lars Wendler <polynomial-c@gentoo.org> +netplug-1.2.9.2.ebuild,
+ +files/netplug.2, metadata.xml:
+ Took over maintenance. Version bump. Thanks to Marco Paolone who reported
+ this in bug #367227. Removed init-ng support. Thanks to Nikoli who provided a
+ working script in bug #373107.
28 Feb 2010; Mounir Lamouri <volkmar@gentoo.org> files/netplug:
Exit correctly when probe is called. Fix bug 228663
diff --git a/sys-apps/netplug/files/netplug.2 b/sys-apps/netplug/files/netplug.2
new file mode 100755
index 000000000000..539f1465516a
--- /dev/null
+++ b/sys-apps/netplug/files/netplug.2
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+#
+# Gentoo-specific netplug script
+#
+# This file gets called by netplug when it wants to bring an interface
+# up or down.
+#
+
+IFACE="$1"
+ACTION="$2"
+
+EXEC="/etc/init.d/net.${IFACE}"
+
+case "${ACTION}" in
+ in)
+ ARGS="--quiet start"
+ ;;
+ out)
+ ARGS="--quiet stop"
+ ;;
+ probe)
+ # Do nothing as we should already be up
+ exit 0
+ ;;
+ *)
+ echo "$0: wrong arguments" >&2
+ echo "Call with <interface> <in|out|probe>" >&2
+ exit 1
+ ;;
+esac
+
+export IN_BACKGROUND=true
+
+if [ -x "${EXEC}" ]
+then
+ ${EXEC} ${ARGS}
+ exit 0
+else
+ logger -t netplug "Error: Couldn't configure ${IFACE}, no ${EXEC} !"
+ exit 1
+fi
diff --git a/sys-apps/netplug/metadata.xml b/sys-apps/netplug/metadata.xml
index dd7901efc224..786355e6ed0d 100644
--- a/sys-apps/netplug/metadata.xml
+++ b/sys-apps/netplug/metadata.xml
@@ -2,8 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer>
- <email>volkmar@gentoo.org</email>
- <name>Mounir Lamouri</name>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
</maintainer>
<longdescription lang="en">
Brings up/down ethernet ports automatically with cable detection
diff --git a/sys-apps/netplug/netplug-1.2.9.2.ebuild b/sys-apps/netplug/netplug-1.2.9.2.ebuild
new file mode 100644
index 000000000000..ab094175328c
--- /dev/null
+++ b/sys-apps/netplug/netplug-1.2.9.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/netplug/netplug-1.2.9.2.ebuild,v 1.1 2011/10/03 07:09:24 polynomial-c Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Brings up/down ethernet ports automatically with cable detection"
+HOMEPAGE="http://www.red-bean.com/~bos/"
+SRC_URI="http://www.red-bean.com/~bos/netplug/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sparc ~x86"
+IUSE="debug doc"
+
+DEPEND="doc? ( app-text/ghostscript-gpl
+ media-gfx/graphviz )"
+RDEPEND=""
+
+src_prepare() {
+ # Remove debug flags from CFLAGS
+ if ! use debug; then
+ sed -i -e "s/ -ggdb3//" Makefile || die "sed failed"
+ fi
+
+ # Remove -O3 and -Werror from CFLAGS
+ sed -i -e "s/ -O3//" -e "s/ -Werror//" Makefile || die "sed failed"
+
+ # Remove nested functions, #116140
+ epatch "${FILESDIR}/${PN}-1.2.9-remove-nest.patch"
+
+ # Ignore wireless events
+ epatch "${FILESDIR}/${PN}-1.2.9-ignore-wireless.patch"
+}
+
+src_compile() {
+ tc-export CC
+ emake CC="${CC}" || die "emake failed"
+
+ if use doc; then
+ emake -C docs/ || die "emake failed"
+ fi
+}
+
+src_install() {
+ into /
+ dosbin netplugd
+ doman man/man8/netplugd.8
+
+ dodir /etc/netplug.d
+ exeinto /etc/netplug.d
+ doexe "${FILESDIR}/netplug.2"
+
+ dodir /etc/netplug
+ echo "eth*" > "${D}"/etc/netplug/netplugd.conf
+
+ dodoc ChangeLog NEWS README TODO || die "dodoc failed"
+
+ if use doc; then
+ dodoc docs/state-machine.ps || die "dodoc failed"
+ fi
+}