summaryrefslogtreecommitdiff
path: root/net-firewall/fwknop/fwknop-1.9.12.ebuild
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-01 21:52:37 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-01 21:52:37 +0200
commita4ed5dd8e6a38a68b22c3c95ba9072fe6fd034af (patch)
tree61f1fafa06e0e837f0902e0313be36f0b384525f /net-firewall/fwknop/fwknop-1.9.12.ebuild
parent0ca1384fbf4d0becb1397a8e496c045046e9232a (diff)
downloadoverlay-a4ed5dd8e6a38a68b22c3c95ba9072fe6fd034af.tar.gz
overlay-a4ed5dd8e6a38a68b22c3c95ba9072fe6fd034af.tar.bz2
overlay-a4ed5dd8e6a38a68b22c3c95ba9072fe6fd034af.zip
Added gpg and server useflag for fwknop
Diffstat (limited to 'net-firewall/fwknop/fwknop-1.9.12.ebuild')
-rw-r--r--net-firewall/fwknop/fwknop-1.9.12.ebuild72
1 files changed, 46 insertions, 26 deletions
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() {