From a4ed5dd8e6a38a68b22c3c95ba9072fe6fd034af Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 1 Apr 2010 21:52:37 +0200 Subject: Added gpg and server useflag for fwknop --- net-firewall/fwknop/fwknop-1.9.12.ebuild | 72 ++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 26 deletions(-) (limited to 'net-firewall/fwknop/fwknop-1.9.12.ebuild') diff --git a/net-firewall/fwknop/fwknop-1.9.12.ebuild b/net-firewall/fwknop/fwknop-1.9.12.ebuild index 11af653..86047b7 100644 --- a/net-firewall/fwknop/fwknop-1.9.12.ebuild +++ b/net-firewall/fwknop/fwknop-1.9.12.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -inherit perl-app +EAPI=2 -IUSE="" +inherit perl-app DESCRIPTION="Single Packet Authorization and Port Knocking" SRC_URI="http://www.cipherdyne.org/fwknop/download/${PN}-nodeps-${PV}.tar.gz" @@ -13,51 +13,71 @@ HOMEPAGE="http://www.cipherdyne.org/fwknop" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" +IUSE="gpg +server" -RDEPEND="virtual/logger - virtual/mailx +RDEPEND=" dev-perl/Class-MethodMaker - dev-perl/GnuPG-Interface - dev-perl/Unix-Syslog dev-perl/crypt-cbc dev-perl/Crypt-Rijndael - dev-perl/Net-Pcap dev-perl/TermReadKey dev-perl/Net-RawIP dev-perl/Net-IPv4Addr - dev-perl/IPTables-Parse - dev-perl/IPTables-ChainMgr virtual/perl-Digest-SHA virtual/perl-net-ping - net-firewall/iptables - net-misc/whois" + server? ( + dev-perl/IPTables-Parse + dev-perl/IPTables-ChainMgr + dev-perl/Net-Pcap + dev-perl/Unix-Syslog + net-firewall/iptables + net-misc/whois + virtual/logger + virtual/mailx + ) + gpg? ( dev-perl/GnuPG-Interface )" src_install() { - doman *.8 + # install client binary + dobin fwknop + + if use server; then + # install daemons + insinto /usr + dosbin fwknop_serv fwknopd knopmd knoptm knopwatchd - keepdir /var/log/fwknop /var/run/fwknop + # fix config + fix_conf - insinto /usr - dosbin fwknop fwknop_serv fwknopd knopmd knoptm knopwatchd + # install configs + insinto /etc/fwknop + doins *.conf + fperms 600 /etc/fwknop/access.conf - fix_conf + # init.d + newinitd init-scripts/fwknop-init.gentoo fwknop - insinto /etc/fwknop - doins *.conf - fperms 600 /etc/fwknop/access.conf + # create (and keep) dirs for the daemons + keepdir /var/log/fwknop /var/run/fwknop - newinitd init-scripts/fwknop-init.gentoo fwknop + # install manpages + doman *.8 + else + # only install the client manpage + doman fwknop.8 + fi dodoc CREDITS Change* README README.* VERSION } pkg_postinst() { - echo - elog "Please be sure to edit /etc/fwknop/fwknop.conf to reflect your system's" - elog "configuration or it may not work correctly or start up. Specifically, check" - elog "the validity of the HOSTNAME setting and EMAIL_ADDRESSES" - echo - elog "You must edit /etc/fwknop/access.conf for fwknop to work correctly." + if use server; then + echo + elog "Please be sure to edit /etc/fwknop/fwknop.conf to reflect your system's" + elog "configuration or it may not work correctly or start up. Specifically, check" + elog "the validity of the HOSTNAME setting and EMAIL_ADDRESSES" + echo + elog "You must edit /etc/fwknop/access.conf for fwknop to work correctly." + fi } fix_conf() { -- cgit v1.2.3-70-g09d2