summaryrefslogtreecommitdiff
path: root/net-misc/miniupnpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-30 17:36:28 +0100
commit7014a5a3ea0feffab9701fdd6b64cc7667a985af (patch)
treef2cbbaa8bb9209cd15208721103228336149b799 /net-misc/miniupnpd
parent7a86906b67693cc65671d3e1476835d3a7e13092 (diff)
gentoo resync : 30.06.2019
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r--net-misc/miniupnpd/Manifest7
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-conf.d-r216
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d-r245
-rw-r--r--net-misc/miniupnpd/metadata.xml1
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild88
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.1.20190625.ebuild65
6 files changed, 221 insertions, 1 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
index 7f4087d664a8..681637225e40 100644
--- a/net-misc/miniupnpd/Manifest
+++ b/net-misc/miniupnpd/Manifest
@@ -1,5 +1,10 @@
AUX miniupnpd-conf.d-r1 301 BLAKE2B 90ead95141ec0ef6591113a352a6a1341496f273d33c5d8ba66756349af8e7b9e1d8dc1b1ec585e32c3c783d9d9ecc456383375527f14c1d48bebfb170eabacd SHA512 47ab1626f5102e26ef8788bb5f90138d178a798c106e377139453d80e687b61bea1262a8429b39fa6f2dee5fc5f112628e580975d8e2e5ab40d43473d38a6c5b
+AUX miniupnpd-conf.d-r2 430 BLAKE2B 4f38d9dcbe3843770cab82b5f26b6bc23067dc58c20cebfbd355364ff6fadb6a9f5787c1f8d22a950774e3b2ebf70670bec0391247c3205a7ab2d926e9598102 SHA512 d011770e3a5aa5c4f45c77009e168c4dd1c25b2abe4b1a93ac3a22c0a6d9903f3b83a87569ec456d79e9d6b3be3af9b3f9c2327f40cc59bead25a3abe29421d9
AUX miniupnpd-init.d-r1 659 BLAKE2B fc2cfeabf10b4e163ea47fb5ba814df0a52a181380bc6c8485daf007a40a352d413833586ea537195bd87e5303a262363bbf71ec71119280329a4996d2a08342 SHA512 11b05eb9d33afbce7b1bee1bf0159875ee0dfb52048aa4f379a0d21b117b04cf0775885d06cc24735d46611aae4a78cc66ba19cf3d8f7db3611909a565e75771
+AUX miniupnpd-init.d-r2 1002 BLAKE2B f697e4cbf3ab08f4b589705ae1cc3ae28f94647103f7a30c8277c02375db6128a2c804c0514ad4cc32fd3d46becc38c0dcd9a7c0ef8befd1ef07ac051509bbfe SHA512 7b773987bdbad18d5c6ff8e2e15484b8f0c28ff3b3be0e832e7b568dc2a93d96eb27acfecb33251b48d92cea557f71b3c5e6c4a6a5e4ae428571d1810e5ce856
DIST miniupnpd-2.1.20190502.tar.gz 236052 BLAKE2B 9f2f81769d72fad2191969e0e80b4d2e70619d5674fe6b4ef9f4306e09ac4737577a2146bc04ec9960df092252abe3c9a57e32d5d893a763b85863d1c4892045 SHA512 6423cef89b5af62b6b6a120a3cd13a0e7755d609b33de8f1671f7f9160fb1b5e68b0ebd3f8b7b5758cf05a1c58b416cde253e37bc5ba0bb423c14b5fb44599f1
+DIST miniupnpd-2.1.20190625.tar.gz 240120 BLAKE2B c6cf6b549a1c0c4a411d9487a3dae348d8a37767b9590d29ea763177d876ceb6f521bb7662452e2dff813354fc52f862bcc830079b3ff8af8185de6ee2771e8f SHA512 3b9a14f24c7e753cc71b84622bfbbc0db4a5b5e0fd602ef1129b89b1c729e754c51f5c29b4bf8d1cc37a16f77b33f04cf3f3540afe1ac529105cb91f45fa92c8
EBUILD miniupnpd-2.1.20190502.ebuild 1468 BLAKE2B d87f2996fd275ffd8b07fe1d499b5eb20904e62eb8f9314301c0c795fe320849704753ed2d97f7d99e55ccfcdb4ba532a98e58c8973a7eeff9277495f923609d SHA512 3dc192b52abcf760418086ca69c92a1170211a1f50d75e6739661ba20bcde6f590b87f2e36c6de81e3b262f5259b61b232f1b66111f583fd53c7eeea44edc722
-MISC metadata.xml 923 BLAKE2B e7b26fae1c4f3f67ae6a3a7da57607cdca2c2999174c35ddf9db972d4871eacac116a4c0f068e4be467c9670294de7ec797a64b06106a54f986336bb111b0c38 SHA512 8e6c396f3601ccbba09e16cd48b0432616d692700b4b402484d4c592101f71a4434772efe63a4e9a2887d00e39eda9865173d74930aa6f792c61eb24b847af69
+EBUILD miniupnpd-2.1.20190625-r1.ebuild 1973 BLAKE2B 3e2882353ac50b2e379089850248f49b379ff0941604f3f9f488680b7bdabeefc340fbd3155a9ec8d13ce65566ee71e0c10049a7264ddc8092464c1ec88eb117 SHA512 df08ccba8c515b1bd3da3d9f38c6826eee5ace7d501efdda8b5835fb1ffed8aef637e0bc4028779dc8fcc7361cdd226412fb0048956761265c228d9999f83d2d
+EBUILD miniupnpd-2.1.20190625.ebuild 1468 BLAKE2B d87f2996fd275ffd8b07fe1d499b5eb20904e62eb8f9314301c0c795fe320849704753ed2d97f7d99e55ccfcdb4ba532a98e58c8973a7eeff9277495f923609d SHA512 3dc192b52abcf760418086ca69c92a1170211a1f50d75e6739661ba20bcde6f590b87f2e36c6de81e3b262f5259b61b232f1b66111f583fd53c7eeea44edc722
+MISC metadata.xml 1037 BLAKE2B 9fa42839f13b135ac2b69091b9d0ba1d3749f3b9903bcaa209c0d23ff981615c58df027725a536b4e268c53eb285ab6750bbeb7e0bc8e668dfca61b787ec9c60 SHA512 536ef1fce9d3d76eb33a88707c5750fc0b014cf29b4c20d3459bc0116a68234667689a297e8aae35507f1b6b9fde7590d14b3763f2813c485478e18f396bfeb8
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2
new file mode 100644
index 000000000000..656ab8ec00a9
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2
@@ -0,0 +1,16 @@
+# /etc/conf.d/miniupnpd: Configuration for miniupnpd init script
+
+# extra arguments to be passed to the command
+#extra_args=""
+
+# the location of the configuration file
+#config_file="/etc/miniupnpd/miniupnpd.conf"
+
+# enable manipulating iptables on start/stop
+iptables_scripts=1
+
+# enable manipulating ip6tables on start/stop
+ip6tables_scripts=1
+
+# enable manipulating nftables on start/stop (for USE=nftables)
+nftables_scripts=1
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 000000000000..e23c7a819951
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2
@@ -0,0 +1,45 @@
+#!/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
+ use iptables ip6tables minissdpd
+}
+
+start_pre() {
+ local retval=0
+
+ if [ -n "${iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_init.sh || retval=${?}
+ fi
+ if [ -n "${ip6tables_scripts}" ]; then
+ /etc/miniupnpd/ip6tables_init.sh || retval=${?}
+ fi
+ if [ -n "${nftables_scripts}" ]; then
+ /etc/miniupnpd/nft_init.sh || retval=${?}
+ fi
+
+ return ${retval}
+}
+
+stop_post() {
+ local retval=0
+
+ if [ -n "${iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_removeall.sh
+ fi
+ if [ -n "${ip6tables_scripts}" ]; then
+ /etc/miniupnpd/ip6tables_removeall.sh
+ fi
+ if [ -n "${nftables_scripts}" ]; then
+ /etc/miniupnpd/nft_removeall.sh
+ fi
+
+ return ${retval}
+}
diff --git a/net-misc/miniupnpd/metadata.xml b/net-misc/miniupnpd/metadata.xml
index 1b672f18d768..5f2aabe1313d 100644
--- a/net-misc/miniupnpd/metadata.xml
+++ b/net-misc/miniupnpd/metadata.xml
@@ -15,6 +15,7 @@
<use>
<flag name="leasefile">Enable lease file.</flag>
<flag name="igd2">Build for IGDv2 instead of an IGDv1</flag>
+ <flag name="nftables">Use <pkg>net-firewall/nftables</pkg> rather than <pkg>net-firewall/iptables</pkg>.</flag>
<flag name="pcp-peer">Enable support for PCP-PEER to allow NAT-PMP clients to mangle their packets.</flag>
<flag name="portinuse">Check if a port is in use before allowing a NAT-PMP client to map it.</flag>
<flag name="strict">Be more strict regarding compliance with UPnP specifications.</flag>
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 000000000000..07c804f35640
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.1.20190625-r1.ebuild
@@ -0,0 +1,88 @@
+# 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 nftables pcp-peer portinuse strict"
+
+RDEPEND="
+ dev-libs/gmp:0=
+ sys-apps/util-linux:=
+ dev-libs/openssl:0=
+ !nftables? (
+ >=net-firewall/iptables-1.4.6:0=[ipv6?]
+ net-libs/libnfnetlink:=
+ net-libs/libmnl:=
+ )
+ nftables? (
+ net-firewall/nftables
+ net-libs/libnftnl:=
+ net-libs/libmnl:=
+ )"
+DEPEND="${RDEPEND}
+ sys-apps/lsb-release"
+
+src_prepare() {
+ default
+
+ # Prevent overriding CFLAGS.
+ sed -i -e '/^CFLAGS =/d' Makefile.linux_nft || die
+
+ mv "Makefile.linux$(usex nftables _nft '')" 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
+
+ local confd_seds=()
+ if use nftables; then
+ confd_seds+=( -e 's/^iptables_scripts=/#&/' )
+ else
+ confd_seds+=( -e 's/^nftables_scripts=/#&/' )
+ fi
+ if ! use ipv6 || use nftables; then
+ confd_seds+=( -e 's/^ip6tables_scripts=/#&/' )
+ fi
+
+ newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN}
+ newconfd - ${PN} < <(sed "${confd_seds[@]}" \
+ "${FILESDIR}"/${PN}-conf.d-r2 || die)
+}
+
+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"
+}
diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190625.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190625.ebuild
new file mode 100644
index 000000000000..673b340fb090
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.1.20190625.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-r1 ${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"
+}