summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mair-Keimberger <m.mairkeimberger@gmail.com>2020-06-21 19:52:30 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-21 20:44:09 +0200
commitea7a05e6988b68c628d6ead1f3adf830d17c3a83 (patch)
tree7dea6e0635d456dacaef2be18c9998797dc6731d /net-misc/knock
parentgui-libs/wf-config: remove old version (diff)
downloadgentoo-ea7a05e6988b68c628d6ead1f3adf830d17c3a83.tar.gz
gentoo-ea7a05e6988b68c628d6ead1f3adf830d17c3a83.tar.bz2
gentoo-ea7a05e6988b68c628d6ead1f3adf830d17c3a83.zip
net-misc/knock: EAPI7, use HTTPS, fix LICENSE
Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/16365 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'net-misc/knock')
-rw-r--r--net-misc/knock/knock-0.7-r1.ebuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/net-misc/knock/knock-0.7-r1.ebuild b/net-misc/knock/knock-0.7-r1.ebuild
new file mode 100644
index 000000000000..c27abd8fac28
--- /dev/null
+++ b/net-misc/knock/knock-0.7-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 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
+ https://github.com/jvinet/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="${EROOT}/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
+}