# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" inherit eutils autotools MY_PV="${PV%.0}" DESCRIPTION="Single Packet Authorization and Port Knocking application" HOMEPAGE="http://www.cipherdyne.org/fwknop/" SRC_URI="http://www.cipherdyne.org/${PN}/download/${PN}-${MY_PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="client server gdbm gpg" RDEPEND="gpg? ( app-crypt/gpgme ) gdbm? ( sys-libs/gdbm ) server? ( net-libs/libpcap net-firewall/iptables )" S=${WORKDIR}/${PN}-${MY_PV} src_prepare() { epatch "${FILESDIR}/${P}-silent-missing-pidfile-warning-on-start.patch" epatch "${FILESDIR}/${P}-Reset-terminal-setting-to-orignal-values-after-enter.patch" epatch "${FILESDIR}/${P}-use-tcflag_t-where-needed.patch" # Install configs with .example suffix use server && sed -i 's/conf;/conf.example;/g' "${S}"/Makefile.am eautoreconf } src_configure() { econf \ --enable-digest-cache \ $(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 }