summaryrefslogtreecommitdiff
path: root/net-misc/knock/knock-0.8.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /net-misc/knock/knock-0.8.ebuild
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'net-misc/knock/knock-0.8.ebuild')
-rw-r--r--net-misc/knock/knock-0.8.ebuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/net-misc/knock/knock-0.8.ebuild b/net-misc/knock/knock-0.8.ebuild
new file mode 100644
index 000000000000..f4a622618980
--- /dev/null
+++ b/net-misc/knock/knock-0.8.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Simple port-knocking daemon"
+HOMEPAGE="https://www.zeroflux.org/projects/knock"
+SRC_URI="https://www.zeroflux.org/proj/knock/files/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="+server"
+
+DEPEND="server? ( net-libs/libpcap )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ sed -e "/^AM_CFLAGS/s: -g : :" \
+ -e "/dist_doc_DATA/s:COPYING::" \
+ -i Makefile.in || die
+
+ sed -e "s:/usr/sbin/iptables:/sbin/iptables:g" \
+ -i knockd.conf || die
+}
+
+src_configure() {
+ econf $(use_enable server knockd)
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="${EPREFIX}/usr/share/doc/${PF}" install
+
+ if use server ; then
+ newinitd "${FILESDIR}"/knockd.initd.2 knock
+ newconfd "${FILESDIR}"/knockd.confd.2 knock
+ fi
+}
+
+pkg_postinst() {
+ if use server && ! has_version net-firewall/iptables ; then
+ elog "You're really encouraged to install net-firewall/iptables to"
+ elog "actually modify your firewall and use the example configuration."
+ fi
+}