# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" inherit eutils autotools DESCRIPTION="Single Packet Authorization and Port Knocking application" HOMEPAGE="http://www.cipherdyne.org/fwknop/" SRC_URI="http://www.cipherdyne.org/${PN}/download/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="gdbm gpg client server" RDEPEND="gpg? ( app-crypt/gpgme ) gdbm? ( sys-libs/gdbm ) server? ( net-libs/libpcap net-firewall/iptables )" DEPEND="${RDEPEND} app-crypt/gpgme" # without it autoconf will fail; upstream notified about this src_prepare() { # Fix parallel build epatch "${FILESDIR}/${P}-fix-parallel-build.patch" # Install configs with .example suffix use server && sed -i 's/conf;/conf.example;/g' "${S}"/Makefile.am eautoreconf } src_configure() { econf \ $(use_enable client) \ $(use_enable server) \ $(use_enable !gdbm file-cache) \ $(use_with gpg gpgme) } src_install() { emake DESTDIR="${D}" install || die use server && newinitd "${FILESDIR}/fwknopd.init" fwknopd }