commit: 7ac379aa5c5599085c69e4e4d197cd73fc6eadb7 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Apr 25 05:27:41 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Apr 25 06:18:36 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ac379aa
net-misc/knock: add 0.8 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/knock/Manifest | 1 + net-misc/knock/knock-0.8.ebuild | 47 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/net-misc/knock/Manifest b/net-misc/knock/Manifest index 136bf879588..87dc877813a 100644 --- a/net-misc/knock/Manifest +++ b/net-misc/knock/Manifest @@ -1 +1,2 @@ DIST knock-0.7.tar.gz 110791 BLAKE2B 19e63854800f4ef77199fb4005dabd749f16681068d205a924fa0bc926d2cc31a69c1f62ffa8ec335209cfa987e7db92d9332b43e971f71528f69740ced06391 SHA512 eab5d855f7111d9411e84a56a15e8ea74f41c5bd9dee27ab49f0d8d509eeeb96a60c508928c92916dc0ec9b737c447ca8ca5ed4db6479b389549d60e76a85aa7 +DIST knock-0.8.tar.gz 377107 BLAKE2B 1397ed04b1a202db08b0bd3a8a26745cd2e8390604c9dde7d18182e7ad4ddd19da074b1b54ea1ed59b1576f3110e21bac722c90a2cd3820910bdaa0026eec395 SHA512 6511e29f604cebc4a4048f5e49c1b73db0bbe0041a88f7c8559fa1a60ea894aadb72a608c423f867a5a4dddb06d00a0713863473981e42273662a77364c260ec diff --git a/net-misc/knock/knock-0.8.ebuild b/net-misc/knock/knock-0.8.ebuild new file mode 100644 index 00000000000..f4a62261898 --- /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 +}