From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48239138334 for ; Sun, 30 Jun 2019 07:39:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 306ADE085D; Sun, 30 Jun 2019 07:39:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F3601E085D for ; Sun, 30 Jun 2019 07:39:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A0771346CF0 for ; Sun, 30 Jun 2019 07:39:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 17D125C0 for ; Sun, 30 Jun 2019 07:39:36 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1561880354.558047cd7e9293f68003d0af7f411fc77d1ceed0.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/miniupnpd/files/, net-misc/miniupnpd/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/miniupnpd/files/miniupnpd-init.d-r2 net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild X-VCS-Directories: net-misc/miniupnpd/ net-misc/miniupnpd/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 558047cd7e9293f68003d0af7f411fc77d1ceed0 X-VCS-Branch: master Date: Sun, 30 Jun 2019 07:39:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8697ffb5-570b-4024-a57d-9a74c6c009a7 X-Archives-Hash: cdfca8f8d24caab31762fca77732a854 commit: 558047cd7e9293f68003d0af7f411fc77d1ceed0 Author: Michał Górny gentoo org> AuthorDate: Sun Jun 30 07:07:03 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jun 30 07:39:14 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=558047cd net-misc/miniupnpd: Fix bashisms in init.d file Closes: https://bugs.gentoo.org/646548 Signed-off-by: Michał Górny gentoo.org> net-misc/miniupnpd/files/miniupnpd-init.d-r2 | 33 +++++++++++ .../miniupnpd/miniupnpd-2.1.20190625-r1.ebuild | 65 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d-r2 b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 new file mode 100644 index 00000000000..744f59e6a44 --- /dev/null +++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/miniupnpd" +: "${config_file:=/etc/miniupnpd/miniupnpd.conf}" +command_args="-f ${config_file:-/etc/miniupnpd/miniupnpd.conf} ${extra_args}" +: "${pidfile:=/var/run/miniupnpd.pid}" + +depend() { + need net iptables + use minissdpd +} + +start_pre() { + local retval=0 + + if [ -z "${no_iptables_scripts}" ]; then + /etc/miniupnpd/iptables_init.sh || retval=${?} + fi + + return ${retval} +} + +stop_post() { + local retval=0 + + if [ -z "${no_iptables_scripts}" ]; then + /etc/miniupnpd/iptables_removeall.sh + fi + + return ${retval} +} diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild new file mode 100644 index 00000000000..0e787f99f32 --- /dev/null +++ b/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="MiniUPnP IGD Daemon" +HOMEPAGE="http://miniupnp.free.fr/" +SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+leasefile igd2 ipv6 pcp-peer portinuse strict" + +RDEPEND=">=net-firewall/iptables-1.4.6:0=[ipv6?] + net-libs/libnfnetlink:= + net-libs/libmnl:= + dev-libs/gmp:0= + sys-apps/util-linux:= + dev-libs/openssl:0=" +DEPEND="${RDEPEND} + sys-apps/lsb-release" + +src_prepare() { + default + mv Makefile.linux Makefile || die + + # Prevent gzipping manpage. + sed -i -e '/gzip/d' Makefile || die +} + +src_configure() { + local -a opts + opts=( + --vendorcfg + $(usex igd2 '--igd2' '') + $(usex ipv6 '--ipv6' '') + $(usex leasefile '--leasefile' '') + $(usex portinuse '--portinuse' '') + $(usex pcp-peer '--pcp-peer' '') + $(usex strict '--strict' '') + ) + + emake CONFIG_OPTIONS="${opts[*]}" config.h +} + +src_compile() { + # By default, it builds a bunch of unittests that are missing wrapper + # scripts in the tarball + emake CC="$(tc-getCC)" STRIP=true miniupnpd +} + +src_install() { + emake PREFIX="${ED}" STRIP=true install + + newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN} + newconfd "${FILESDIR}"/${PN}-conf.d-r1 ${PN} +} + +pkg_postinst() { + elog "Please correct the external interface in the top of the two" + elog "scripts in /etc/miniupnpd and edit the config file in there too" +}