summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2013-02-26 04:54:34 +0100
committerFrancisco Blas Izquierdo Riera (klondike) <klondike@xiscosoft.es>2013-02-26 04:56:39 +0100
commit8075aa1f699f1146a192fcd8ff450863b3cd0b9c (patch)
tree217df4119e262abeb07940e19403e3b6ba9c55f1
parentAdding support for using the system boost libraries (diff)
downloadklondike-8075aa1f699f1146a192fcd8ff450863b3cd0b9c.tar.gz
klondike-8075aa1f699f1146a192fcd8ff450863b3cd0b9c.tar.bz2
klondike-8075aa1f699f1146a192fcd8ff450863b3cd0b9c.zip
Adding nmdcredir
Package-Manager: portage-2.1.11.50
-rw-r--r--net-p2p/nmdcredir/ChangeLog10
-rw-r--r--net-p2p/nmdcredir/Manifest6
-rw-r--r--net-p2p/nmdcredir/files/nmdcredir.conf.d18
-rw-r--r--net-p2p/nmdcredir/files/nmdcredir.init.d41
-rw-r--r--net-p2p/nmdcredir/metadata.xml8
-rw-r--r--net-p2p/nmdcredir/nmdcredir-1.ebuild38
6 files changed, 121 insertions, 0 deletions
diff --git a/net-p2p/nmdcredir/ChangeLog b/net-p2p/nmdcredir/ChangeLog
new file mode 100644
index 0000000..17f9c31
--- /dev/null
+++ b/net-p2p/nmdcredir/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-p2p/nmdcredir
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*nmdcredir-1 (26 Feb 2013)
+
+ 26 Feb 2013; Francisco Blas Izquierdo Riera (klondike) +nmdcredir-1.ebuild,
+ +files/nmdcredir.conf.d, +files/nmdcredir.init.d, +metadata.xml:
+ Adding nmdcredir
+
diff --git a/net-p2p/nmdcredir/Manifest b/net-p2p/nmdcredir/Manifest
new file mode 100644
index 0000000..203e39e
--- /dev/null
+++ b/net-p2p/nmdcredir/Manifest
@@ -0,0 +1,6 @@
+AUX nmdcredir.conf.d 502 SHA256 6b87470c9ca450e93a5484bce18c6bc2b868cd42a3dc082d59db50f128426608 SHA512 9bafadc77c22312256663e805216b66be118194abf9fc8ddde20e4242e92286e7b2a19419d2b55ae2b7fbb2da3a079e11f2934c997b13016d1478faff049a48b WHIRLPOOL a0c3183d2e7e84dfe61d0d05d8e962d26eab107d043643bb8d2dc88e1d36b8d1cfaedab539f2d0071664c075b433242acf0585ee60020ae541e53af1315117f1
+AUX nmdcredir.init.d 1174 SHA256 26e65ae1d55ffc223e02e747c7f797800b9780736f7a0660aa70a021d832d67f SHA512 dfa2ef41498a1ed6135f6fc0ade8d99b07213efc7380bca5a8839a232ebc2d9550c3d7954df339780e3eb5f269bd291f79325f8fb084a03b2bc2ca0103f90500 WHIRLPOOL e7c9df067427189dfb1a820c13ac3f87bc7a47e6eb60190489a8bcdb2fc7ba8ca96f3e3b8ab9073d175d7fd81d74d05392a9ff520a3d503208d93e3746fadfbd
+DIST nmdcredir-1.tar.gz 1842 SHA256 eab1a03cda65cb9ada13e922c4747c82e762d42efe4dd040be61e0179fc7d31b SHA512 caedfe0070c6df0b3f8c7b17b6457b0bc59f1a71cb89532cb0977d724654ab7a804ced3f75231f9aee2294dc4535283b7e34e45f5d427298c14c08ea1637f6aa WHIRLPOOL fc643a8f0de5c8bc302fb76a768a6139a2d4921d83cb7af3e3dbbf386ad425436a51e41526f8ffbc6bcf9d59647a16e7395241ce5d0902354436d4e9195d747a
+EBUILD nmdcredir-1.ebuild 853 SHA256 cc15cf0d67fbaa7875b02f28a2cf5548debe20a370d06ef4b4155b44deda1b96 SHA512 2851d0ce71fe3740c0868c2ad77a34a89f25a94049003e96028340ebd2896c158d70864d0d35bb90160f2eab978523c6007a05b50ec7f79e8d802a262c8a1a2f WHIRLPOOL bda21451364bf651a3e0f94008813d1c05232dbd1fde6747496dea8a3938a6905e7207946add72de1ec482b9240897d9fa7b4f83c7e62d544bc77289294c0483
+MISC ChangeLog 311 SHA256 3d05907cd74907d61f657bc19bc335e30f7be3dc7e0e01f2f978e5205247ac04 SHA512 d59d942515b70ca9905e979be7845db38dbac05a08ab5801b5d060cae8d81ee1f7845c1575ec6c8e4f5e9eaad6694203c1a10a4ab4923cbc2eeb73d79054e2fe WHIRLPOOL b17851956d40c35bd75c28093379446044fe800b0f46f2421eb85c1728a5d92658a3536d78887d76d6814b9bc13f67527824394617c99947385de853e71855c9
+MISC metadata.xml 251 SHA256 d3cfc8be6be78d585444c874f1a50dd2cdf0fb65e8e4defdad65acf21b1b2ce0 SHA512 0a85fe888ea9f2bb94aff3540958a673b849e4f1806ffcb9310d7df7f5aa5b30267315918531792637820815d82814a3adda72e8c9ceab3e47defe0d10eb191f WHIRLPOOL 9ad134667455ee081b762d981393f63005eacb4288c10a1ebfc3dc0eb32d8da0819e707a7b7077300d71dc02e2f989c7c9f8bb25cd81544118ea309979fd8b46
diff --git a/net-p2p/nmdcredir/files/nmdcredir.conf.d b/net-p2p/nmdcredir/files/nmdcredir.conf.d
new file mode 100644
index 0000000..1588164
--- /dev/null
+++ b/net-p2p/nmdcredir/files/nmdcredir.conf.d
@@ -0,0 +1,18 @@
+# /etc/conf.d/adhchpp: config file for /etc/init.d/adchpp
+
+#User under which the server will run
+NMDCREDIR_USER="nmdcredir"
+
+#Group under which the server will run
+NMDCREDIR_GROUP="nmdcredir"
+
+# Port to listen to
+NMDCREDIR_PORT="411"
+# Adress to redirect to
+NMDCREDIR_ADDR="adcs://localhost:2780/"
+
+#If a message should be sent set this to the hubname
+NMDCREDIR_HUBN="TheHub"
+
+#Message to send if NMDCREDIR_HUBN is set
+NMDCREDIR_MESS="You are being redirected to our new hub at adcs://localhost:2780/"
diff --git a/net-p2p/nmdcredir/files/nmdcredir.init.d b/net-p2p/nmdcredir/files/nmdcredir.init.d
new file mode 100644
index 0000000..00efdf3
--- /dev/null
+++ b/net-p2p/nmdcredir/files/nmdcredir.init.d
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ use dns
+ need net
+}
+
+PIDFILE=/var/run/${RC_SVCNAME}.pid
+
+# port redirection_address [hub_name redirect_message]
+# Port to listen to
+NMDCREDIR_PORT="411"
+# Adress to redirect to
+NMDCREDIR_ADDR="adcs://localhost:2780/"
+
+#If a message should be sent set this to the hubname
+NMDCREDIR_HUBN="TheHub"
+
+#Message to send if NMDCREDIR_HUBN is set
+NMDCREDIR_MESS="You are being redirected to our new hub at adcs://localhost:2780/"
+
+
+start() {
+ ebegin "Starting nmdcredir ${RC_SVCNAME}"
+ if [ -z ${NMDCREDIR_HUBN} ]; then
+ start-stop-daemon --start --pidfile "${PIDFILE}" -u ${NMDCREDIR_USER}:${NMDCREDIR_GROUP} -m -b /usr/bin/nmdcredir -- "${NMDCREDIR_PORT}" "${NMDCREDIR_ADDR}"
+ else
+ start-stop-daemon --start --pidfile "${PIDFILE}" -u ${NMDCREDIR_USER}:${NMDCREDIR_GROUP} -m -b /usr/bin/nmdcredir -- "${NMDCREDIR_PORT}" "${NMDCREDIR_ADDR}" \
+ "${NMDCREDIR_HUBN}" "${NMDCREDIR_MESS}"
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nmdcredir ${RC_SVCNAME}"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/net-p2p/nmdcredir/metadata.xml b/net-p2p/nmdcredir/metadata.xml
new file mode 100644
index 0000000..1c9a64e
--- /dev/null
+++ b/net-p2p/nmdcredir/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>klondike@gentoo.org</email>
+ <name>Francisco Blas Izquierdo Riera</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-p2p/nmdcredir/nmdcredir-1.ebuild b/net-p2p/nmdcredir/nmdcredir-1.ebuild
new file mode 100644
index 0000000..d3da92e
--- /dev/null
+++ b/net-p2p/nmdcredir/nmdcredir-1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils fcaps
+
+DESCRIPTION="Simple C NMDC redirector using threads"
+HOMEPAGE="http://klondike.es/programas/nmdcredir/"
+SRC_URI="http://klondike.es/programas/${PN}/${P}.tar.gz"
+#S="${WORKDIR}/${P}"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+FILECAPS=( -g nmdcredir -m 710 -M 710 cap_net_bind_service usr/bin/${PN} )
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ #Create the users
+ enewgroup nmdcredir
+ enewuser nmdcredir -1 -1 -1 "nmdcredir"
+}
+
+src_install() {
+ dobin ${PN}
+ fowners root:nmdcredir /usr/bin/${PN}
+ newinitd "${FILESDIR}/${PN}.init.d" "${PN}"
+ newconfd "${FILESDIR}/${PN}.conf.d" "${PN}"
+ if use filecaps; then
+ ewarn "Using capabilities to allow to listen on ports below 1024"
+ fi
+}