diff options
-rw-r--r-- | net-misc/stund/Manifest | 5 | ||||
-rw-r--r-- | net-misc/stund/files/stund-0.96-BJA-amd64.diff | 13 | ||||
-rw-r--r-- | net-misc/stund/files/stund.confd | 3 | ||||
-rw-r--r-- | net-misc/stund/files/stund.initd | 33 | ||||
-rw-r--r-- | net-misc/stund/stund-0.96.ebuild | 45 |
5 files changed, 99 insertions, 0 deletions
diff --git a/net-misc/stund/Manifest b/net-misc/stund/Manifest new file mode 100644 index 00000000..d31339eb --- /dev/null +++ b/net-misc/stund/Manifest @@ -0,0 +1,5 @@ +AUX stund-0.96-BJA-amd64.diff 557 RMD160 995ab52497879e8c525f8c981c6352b18068641c SHA1 3ef7bf91326d4139f02914b9da66a5c09699b99f SHA256 29319b65f6591055dc7f5da2dbde2ee2f81563f8fed20ee79834ce5f8c5ff490 +AUX stund.confd 49 RMD160 5e028c407700279559ef0b6bb554e0927698ebdb SHA1 9c0f0c66a127f9ba1597e6778a2704b87d33391a SHA256 d77624c10e2a7b1885329d211d0369049708942ef9292e84a91dd775e3e3d207 +AUX stund.initd 645 RMD160 68b92571121b50cec34642cf635674919d9bf1f0 SHA1 2294369e13a804d02db067d5e8de2265ba781ca8 SHA256 8d00f31468edb648573f0240b44c9e91fcdfef4ba19ab80b00c66cd25e47282f +DIST stund_0.96_Aug13.tgz 84730 RMD160 2e9651f2a37e3827e30ccf482bc37f1ea29ec330 SHA1 9eec681641855c0ea5d9f0b5f1d6e01401608f80 SHA256 a34b83eea2669ac681c07f2ffd404eaefa3e280b650b97e7152dd8fccc077fcc +EBUILD stund-0.96.ebuild 748 RMD160 a1788fb51f22556228f1ef3df5bd1fd770d4197e SHA1 184b4646036a3a84fe7909e5c075f9a61a616ec5 SHA256 569c9ec189c365eff25937d76fe3610f61ada8c5057688a5b3473bf874fa0ef3 diff --git a/net-misc/stund/files/stund-0.96-BJA-amd64.diff b/net-misc/stund/files/stund-0.96-BJA-amd64.diff new file mode 100644 index 00000000..6aafcce5 --- /dev/null +++ b/net-misc/stund/files/stund-0.96-BJA-amd64.diff @@ -0,0 +1,13 @@ +--- stun.cxx.ori 2010-12-18 10:53:19.216286790 +0100 ++++ stun.cxx 2010-12-18 10:53:46.806347204 +0100 +@@ -671,6 +671,10 @@ + tick |= lowtick; + #elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) ) + asm("rdtsc" : "=A" (tick)); ++#elif defined(__GNUC__) && defined(__x86_64__) ++ unsigned _a,_d; ++ asm("rdtsc" : "=A" (_a), "=D" (_d)); ++ tick = ((unsigned long long) (_a)) | (( (unsigned long long) (_d)) << 32); + #elif defined (__SUNPRO_CC) || defined( __sparc__ ) + tick = gethrtime(); + #elif defined(__MACH__) diff --git a/net-misc/stund/files/stund.confd b/net-misc/stund/files/stund.confd new file mode 100644 index 00000000..b0151e0d --- /dev/null +++ b/net-misc/stund/files/stund.confd @@ -0,0 +1,3 @@ +# Specify in LISTEN binding IP + +LISTEN=127.0.0.1 diff --git a/net-misc/stund/files/stund.initd b/net-misc/stund/files/stund.initd new file mode 100644 index 00000000..35073eb0 --- /dev/null +++ b/net-misc/stund/files/stund.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PIDFILE=/var/run/${SVCNAME}.pid + +depend() { + need net +} + +checkconfig() { + if [ -z "${LISTEN}" ] ; then + eerror "LISTEN should not be empty" + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet \ + --background \ + --make-pidfile \ + --exec /usr/bin/stund \ + --user nobody --group nobody \ + --pidfile "${PIDFILE}" \ + -- -h ${LISTEN} -a 127.0.0.1 ${PORT:+-p $PORT} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" +} diff --git a/net-misc/stund/stund-0.96.ebuild b/net-misc/stund/stund-0.96.ebuild new file mode 100644 index 00000000..b9915667 --- /dev/null +++ b/net-misc/stund/stund-0.96.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 +inherit eutils + +DESCRIPTION="STUN server" +HOMEPAGE="http://sourceforge.net/projects/stun/" +SRC_URI="mirror://sourceforge/stun/${PN}_${PV}_Aug13.tgz" + +LICENSE="AS-IS" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${PN} + +src_unpack () +{ + unpack "${A}" + cd "${S}" + epatch "${FILESDIR}"/${P}-BJA-amd64.diff +} + +src_compile () +{ + emake server || die "emake server failed" +} + +src_install () +{ + cp "${S}"/server "${S}"/stund || die + insinto /usr + dobin stund + + newinitd "${FILESDIR}/"${PN}.initd ${PN} + newconfd "${FILESDIR}/"${PN}.confd ${PN} + + dodoc nattestwarning.txt + dodoc rfc3489.txt +} |