diff options
-rw-r--r-- | net-misc/knock/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/knock/knock-0.5-r1.ebuild | 22 | ||||
-rw-r--r-- | net-misc/knock/metadata.xml | 3 |
3 files changed, 22 insertions, 9 deletions
diff --git a/net-misc/knock/ChangeLog b/net-misc/knock/ChangeLog index 884a26f1a161..3077fa2986b2 100644 --- a/net-misc/knock/ChangeLog +++ b/net-misc/knock/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/knock # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/knock/ChangeLog,v 1.38 2010/08/31 09:33:43 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/knock/ChangeLog,v 1.39 2010/08/31 11:02:24 xmw Exp $ + + 31 Aug 2010; Michael Weber <xmw@gentoo.org> knock-0.5-r1.ebuild, + metadata.xml: + Made knockd daemon optional with IUSE server, fixes bug 311257. *knock-0.5-r1 (31 Aug 2010) diff --git a/net-misc/knock/knock-0.5-r1.ebuild b/net-misc/knock/knock-0.5-r1.ebuild index ef9c1b72fc18..0aff19575cf9 100644 --- a/net-misc/knock/knock-0.5-r1.ebuild +++ b/net-misc/knock/knock-0.5-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/knock/knock-0.5-r1.ebuild,v 1.1 2010/08/31 09:33:43 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/knock/knock-0.5-r1.ebuild,v 1.2 2010/08/31 11:02:24 xmw Exp $ EAPI=2 @@ -13,28 +13,34 @@ SRC_URI="http://www.zeroflux.org/proj/knock/files/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc ~sparc ~x86" -IUSE="" +IUSE="+server" -DEPEND="net-libs/libpcap" -RDEPEND="net-firewall/iptables - ${DEPEND}" +DEPEND="server? ( net-libs/libpcap )" +RDEPEND="${DEPEND}" src_prepare() { epatch "${FILESDIR}"/${P}-gcc-4.3.patch sed -i -e "s:/usr/sbin/iptables:/sbin/iptables:g" knockd.conf || die + + if ! use server ; then + sed -i -e '/^all:/s:knockd::' \ + -e '/$(INSTALL).*knockd/d' Makefile.in || die + fi } src_install() { make DESTDIR="${D}" install || die dodoc ChangeLog README TODO || die - newinitd "${FILESDIR}"/knockd.initd knock || die - newconfd "${FILESDIR}"/knockd.confd knock || die + if use server ; then + newinitd "${FILESDIR}"/knockd.initd knock || die + newconfd "${FILESDIR}"/knockd.confd knock || die + fi } pkg_postinst() { - if ! has_version net-firewall/iptables ; then + if use server && ! has_version net-firewall/iptables ; then einfo elog "You're really encouraged to install net-firewall/iptables to" elog "actually modify your firewall and use the example configuration." diff --git a/net-misc/knock/metadata.xml b/net-misc/knock/metadata.xml index 81b23f04061d..4366cff8f355 100644 --- a/net-misc/knock/metadata.xml +++ b/net-misc/knock/metadata.xml @@ -6,4 +6,7 @@ <email>xmw@gentoo.org</email> <name>Michael Weber</name> </maintainer> + <use> + <flag name='server'>Installs the knockd server daemon.</flag> + </use> </pkgmetadata> |