summaryrefslogtreecommitdiff
path: root/net-misc/miniupnpd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/miniupnpd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r--net-misc/miniupnpd/Manifest11
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-conf.d2
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-conf.d-r110
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d22
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d-r133
-rw-r--r--net-misc/miniupnpd/metadata.xml26
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.0.20161216.ebuild62
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.0.ebuild62
8 files changed, 228 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
new file mode 100644
index 000000000000..cb25632d8ed2
--- /dev/null
+++ b/net-misc/miniupnpd/Manifest
@@ -0,0 +1,11 @@
+AUX miniupnpd-conf.d 41 SHA256 8c6dae8588e21208a2f0a17965548e0b0708ceeea1157e2506f745e28913f9b3 SHA512 81aa2dac0643bbd1331549427c438900319adce91928b6bad6f7d470492f6f48e04e4d1af89f961db53fc132a7ff89ea52625441f051afd5a1b48680917f4ff7 WHIRLPOOL 1e7a01c6d9ae398f418fafd9d1fb23842d999635d34ed567b4b21b23e1119e43aba3fae40ea8834e179372fbb94bc74371dd37eb0e99420fa0503810ecfb9088
+AUX miniupnpd-conf.d-r1 301 SHA256 0466660546e6d271a52db2e86f8380b4145b2c3ea2ab206a1ad5dcf067326fe8 SHA512 47ab1626f5102e26ef8788bb5f90138d178a798c106e377139453d80e687b61bea1262a8429b39fa6f2dee5fc5f112628e580975d8e2e5ab40d43473d38a6c5b WHIRLPOOL 81a7da536963be9d7a9a12b2ac1fdba18c3ed251705b2ac0406442980248386231d09cd11412dde6e225b8a018879348ab5c05253aece50ca68e94516e343349
+AUX miniupnpd-init.d 510 SHA256 8963a70d2b5d49119eaab7a4828bd7b2acfc1f9c8223ee9c85818cd1b4411a07 SHA512 976304d4036a43335e893d4e30c23853834f810585c10dc93e9e8900c9057d31bfe2ecdeb1e48a5762521b8223bbdf56c3230285c9b5ab5fb1d75f4be4ddfea2 WHIRLPOOL f07dc96d07628a11e608560f371b33091e5712d0aa67184a5b12296c474e656752f2970ee1e59d7bdae6da7996b8cf3c4b16a061b40eebe1e58ef4a7ff281612
+AUX miniupnpd-init.d-r1 659 SHA256 e20d45106353a4b470cbe62dbd71f7fbba373494015f3f1826e35ed55d8925b9 SHA512 11b05eb9d33afbce7b1bee1bf0159875ee0dfb52048aa4f379a0d21b117b04cf0775885d06cc24735d46611aae4a78cc66ba19cf3d8f7db3611909a565e75771 WHIRLPOOL 460f01a0fd582ee69fabd17e7c07ec3104ac82f38aebe975bc8c98512239915434042205fb48a1489583ea3d7f54550f8fd7944ba02273801fe49171466bc6fd
+DIST miniupnpd-2.0.20161216.tar.gz 218119 SHA256 9e73d50ac830b5e08b6eb1df4e4c917833a5ab54351809f615d15d0f30cdeef3 SHA512 af82f060d28033dd670fcc96c8e2895f92d249a8a79d991e0215159eeb57715d7a9152d7d751b836091f7a623ce8a194ea243d1a2fb639349e320c02ce187c27 WHIRLPOOL 478a56b137b86ba1dca70e15c7dbdef2969a2d089e1ae0bac7ff01c18e753c8c3cca8b89ef415d54c3a009b89156eb507e97ba1949223bdd37914042c5124be1
+DIST miniupnpd-2.0.tar.gz 217802 SHA256 d96aa3a00e0f5490826bba3cb97e68cd27479e5839adac4b9bcb66eae786bfb7 SHA512 c88036d3f4b065fc855572db8945d921641a71a23ffe8b52cb4ccb1a7cf3e7396841c436d54d7ff5968d034d8c4bfc91630719959000436230bb8c37e5bdc8d4 WHIRLPOOL d6aec880c9ef3c70002fdf9a98a0e8f4de95d8b3c9c6a18e328bc94d7dc3b8c130829c8ea6117e27e5b0aac1cd4526bbc9d9de21bd13e7b5527db54a656a1fff
+EBUILD miniupnpd-2.0.20161216.ebuild 1468 SHA256 c9e6c485580737e48fd19e39e0e834756c35b63c42f72a285a8b58567e43da15 SHA512 ef1a6777848cc09930a15321ec2ad90fc458a3ce2bbc5e0387de5f4093583eaa69911ec0c8f79c5fb56f2fa916759553ce3b78606111be5aba8c36c9c224460e WHIRLPOOL 05f728133588741a5f5bcd7039334db9b11b98f5e85ee911602bea428cc9d1b08b2b3db48c86b113fa18aed7b4f0bca89e5d010d00ec83e6fd51800f2841d82b
+EBUILD miniupnpd-2.0.ebuild 1488 SHA256 2ba7672836c59c312e4e10d4206d74ca5e4c7cfb8360a08d79d816a56b3d45d0 SHA512 35824d68869b52670b2bc69d598d1fc8724cf041e3effa796944c006eb9f94635afa37756617c88dc396a14a94b0bf78d68df169879eb6107692dc339100532a WHIRLPOOL aea034de205cd1a9e5c79fac35e32b15a0297577a1f1470ae1313f12f2be8cbbca6a4ad825cfbfae72259dae6a1af725e7512ff00e381005f8fddc1faa5cdb26
+MISC ChangeLog 3865 SHA256 922c601a075a75759351cab586d30f5a46ed2b7e81186484adb7e903790a84bc SHA512 2509f4e3a97b1345fceb510296aa6c839a4c4f622535c0034875aca011902e4f14ecfbec33bdf524e38d0f18fdc5995bca21d293c19a4d5036a257d0b8f92a8a WHIRLPOOL 45e18145ead0ecf9f19456f5495b3815c0fdbcfeac345c2657e3903561046bad85f9b3c390715d0ded75d7344973f56ac9a534be805d35ad40b5cff769b7abfe
+MISC ChangeLog-2015 8740 SHA256 bf95830c3179813e7192e8e60e8b685b89b9a6a7f216d8571652e1c9777dcea8 SHA512 4759a856a36cd4d42803c6b4ad66b1cb9fe4d5b41be88648a65f0875d4aa003b74341b904dd7fddbdeb6b9cc5221950c619e85dea34e3a79dd3ecf9cb8700298 WHIRLPOOL 4725d0b3495b5421eca6f687987f8f2d2337d582409b513d0976851c13daedcb93b835c0f0529ff08eba078cd99ac19f839e990c6f20e9004370fd0808169875
+MISC metadata.xml 1055 SHA256 d2519ba819f9a1e2121dc4d389dc277fd0fbe5eeea3f97952919630062311ee7 SHA512 38a62c904cfc7c8e4c0bf16a0426ee8cd2338933f85fc1a7d9fa3e0cb1b74525df1a6bf2bc8dea83bf41003e683f76804bcb1b69bd17b855290a5f37792328b2 WHIRLPOOL 2067d540de3934c4003919fec13e3de3f202c180899bb4bc450ce730e1ed4806571f7f510f66b1e52e37097e39ef4c94d1f1c10b153d9a453cb54f800c6e91e8
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d b/net-misc/miniupnpd/files/miniupnpd-conf.d
new file mode 100644
index 000000000000..8482ef2d185b
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-conf.d
@@ -0,0 +1,2 @@
+ARGS='-f /etc/miniupnpd/miniupnpd.conf'
+
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d-r1 b/net-misc/miniupnpd/files/miniupnpd-conf.d-r1
new file mode 100644
index 000000000000..1464bf04bd18
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-conf.d-r1
@@ -0,0 +1,10 @@
+# /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"
+
+# uncomment to not use included scripts to manipulate iptables
+#no_iptables_scripts=1
diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d b/net-misc/miniupnpd/files/miniupnpd-init.d
new file mode 100644
index 000000000000..6d1ee24e3d31
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net iptables
+ use minissdpd
+}
+
+start() {
+ ebegin "Starting miniupnpd"
+ /etc/miniupnpd/iptables_init.sh
+ start-stop-daemon --start --pidfile /var/run/miniupnpd.pid --exec /usr/sbin/miniupnpd -- ${ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping miniupnpd"
+ start-stop-daemon --stop --pidfile /var/run/miniupnpd.pid
+ eend $?
+ /etc/miniupnpd/iptables_removeall.sh
+}
diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d-r1 b/net-misc/miniupnpd/files/miniupnpd-init.d-r1
new file mode 100644
index 000000000000..99406106a86d
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r1
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# 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/metadata.xml b/net-misc/miniupnpd/metadata.xml
new file mode 100644
index 000000000000..c4e9cf4a54d8
--- /dev/null
+++ b/net-misc/miniupnpd/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gurligebis@gentoo.org</email>
+ <name>Bjarke Istrup Pedersen</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <longdescription>
+ MiniUPnP Internet Gateway Device Deamon, used to allow UPnP enabled clients to forward ports.
+ </longdescription>
+ <use>
+ <flag name="leasefile">Enable lease file.</flag>
+ <flag name="igd2">Build for IGDv2 instead of an IGDv1</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>
+ </use>
+</pkgmetadata>
diff --git a/net-misc/miniupnpd/miniupnpd-2.0.20161216.ebuild b/net-misc/miniupnpd/miniupnpd-2.0.20161216.ebuild
new file mode 100644
index 000000000000..cbdc231611f5
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.0.20161216.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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
+}
+
+src_configure() {
+ local -a opts
+ opts=(
+ --vendorcfg
+ $(use igd2 && printf -- '--igd2\n')
+ $(use ipv6 && printf -- '--ipv6\n')
+ $(use leasefile && printf -- '--leasefile\n')
+ $(use portinuse && printf -- '--portinuse\n')
+ $(use pcp-peer && printf -- '--pcp-peer\n')
+ $(use strict && printf -- '--strict\n')
+ )
+
+ 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"
+}
diff --git a/net-misc/miniupnpd/miniupnpd-2.0.ebuild b/net-misc/miniupnpd/miniupnpd-2.0.ebuild
new file mode 100644
index 000000000000..1347a12fbd0e
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs flag-o-matic
+
+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
+}
+
+src_configure() {
+ local -a opts
+ opts=(
+ --vendorcfg
+ $(use igd2 && printf -- '--igd2\n')
+ $(use ipv6 && printf -- '--ipv6\n')
+ $(use leasefile && printf -- '--leasefile\n')
+ $(use portinuse && printf -- '--portinuse\n')
+ $(use pcp-peer && printf -- '--pcp-peer\n')
+ $(use strict && printf -- '--strict\n')
+ )
+
+ 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"
+}