summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/hamachi/ChangeLog10
-rw-r--r--net-misc/hamachi/Manifest4
-rw-r--r--net-misc/hamachi/files/hamachi.initd.265
-rw-r--r--net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild107
4 files changed, 183 insertions, 3 deletions
diff --git a/net-misc/hamachi/ChangeLog b/net-misc/hamachi/ChangeLog
index dc7e3c70a1a7..2bef531675f8 100644
--- a/net-misc/hamachi/ChangeLog
+++ b/net-misc/hamachi/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/hamachi
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/hamachi/ChangeLog,v 1.9 2008/09/10 15:58:53 darkside Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hamachi/ChangeLog,v 1.10 2009/07/30 10:10:11 ssuominen Exp $
+
+*hamachi-0.9.9.9_p20-r3 (30 Jul 2009)
+
+ 30 Jul 2009; Samuli Suominen <ssuominen@gentoo.org>
+ +hamachi-0.9.9.9_p20-r3.ebuild, +files/hamachi.initd.2:
+ Make init script POSIX wrt #279058, thanks to Michał Górny.
10 Sep 2008; Jeremy Olexa <darkside@gentoo.org>
hamachi-0.9.9.9_p20-r2.ebuild:
diff --git a/net-misc/hamachi/Manifest b/net-misc/hamachi/Manifest
index d2751b945d5e..69015a4bc3b3 100644
--- a/net-misc/hamachi/Manifest
+++ b/net-misc/hamachi/Manifest
@@ -1,9 +1,11 @@
AUX hamachi.confd 485 RMD160 23abf2e0a1c11a88acdf99e179379fc499c48bf2 SHA1 cc3d3c4ec0e84622eb1cefeb6c40c2e4c9de224f SHA256 f2ef14119acc285f7c945b316890cc5a3219b7e71232bb8aa6ad508407839b22
AUX hamachi.initd 1430 RMD160 8b2241ed245fbb1b3559eb2cd61b665d43157b2f SHA1 d0cb22b2953df3d942bd66e43c17376e27aca57d SHA256 5f1193b63508c3cdfa6a978a9492499f3e3da0eb8ebc34ec02abb22d9eaaea26
+AUX hamachi.initd.2 1331 RMD160 2b219fea4682d5b95d4f910c6865a4eda47b36b2 SHA1 b47f0cb2a7ecd044e63a1c9e520b0bc3a9d647a5 SHA256 6b864ffe8acb60490df28d1cb7df2b59f1aae7400a99cd0f90bec73753d01d60
AUX tuncfg.confd 288 RMD160 1311a87b30e2fb185505c2945912d6916df75519 SHA1 dcd0829a70c2a3b127d45d2f71ace0f00e1b862d SHA256 d2fdf055d728beb7a570517844883ea1c9ded9fdc8cbd5ded8fc7b5b92ee5c1e
AUX tuncfg.initd 370 RMD160 5d5c884a8a8745af4db7c1f1f0ee6230e7c42d1c SHA1 fd023110044bdf568de05749a9de85947566114a SHA256 b885dbf0af46284764644ede1fefe08817e8e15b0cc49eb5ec5965822f4139b2
DIST hamachi-0.9.9.9-20-lnx-pentium.tar.gz 111300 RMD160 7aac53fa9bf678cc1dac6a4b0f33a9b1d93159c1 SHA1 898fe754e5a95eeeaf26996b9e773d4ee1c7f76d SHA256 9377947eed6b8518911a7ee1a0047630ba4ed123e41bff79998e813875cc63dd
DIST hamachi-0.9.9.9-20-lnx.tar.gz 344866 RMD160 b3af2549fe19aca352200c5fb101e8cd1822fc5d SHA1 c3dfb636ec6abbd8438dc8737fea957e3a854d14 SHA256 9e4b733558377d0c971ee2a19e04c0f5956e069033e8d13865f7c4dcb6d7f31b
EBUILD hamachi-0.9.9.9_p20-r2.ebuild 2695 RMD160 5cdb0f34e52cb026caa9f5419e64318a3651bf4f SHA1 f52f64ae746835d8846e5b293ed5202c38793b77 SHA256 b7a1d6f094512135b1336086983e76ff918bacb390f09672ef8ef959d2eefd63
-MISC ChangeLog 1413 RMD160 a163432ca487ba12b8e2054d240a6830c2d90561 SHA1 6bda45ff0ad2442c0d297c2cf0204151877aaaca SHA256 9e43ca300aad5892e9b54e1d1a1321cec559e24f50ac5423713c323dc12403e5
+EBUILD hamachi-0.9.9.9_p20-r3.ebuild 2698 RMD160 ab165bf5a16759c056d6b00626346021ebcd60c0 SHA1 d789dacfa698ee648be55103322d30214ae955fc SHA256 04ea26eca3802f936fe1eb09750f085c862149c96679fcfe6bc2a59acc9a3118
+MISC ChangeLog 1631 RMD160 675aa590c7a6076a0d8080f284b10026e0810074 SHA1 8e1151052e446942fbe2542dd60630a42afa6acd SHA256 a030b20ad292ad06e335adfbaab3c15422d58d3d59a4bbfc5901083a499ecd15
MISC metadata.xml 465 RMD160 0002b109e8754d930c6c883886c6caaa94109727 SHA1 e7b6396c08acdf87563cf4a926a4b2f564c54325 SHA256 786b0696eaf4cc91b7b0de7ed53e6dce9832f9b2f4d4615f4e987be82fbb80d0
diff --git a/net-misc/hamachi/files/hamachi.initd.2 b/net-misc/hamachi/files/hamachi.initd.2
new file mode 100644
index 000000000000..1c03d2b38438
--- /dev/null
+++ b/net-misc/hamachi/files/hamachi.initd.2
@@ -0,0 +1,65 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="start stop status init"
+
+depend() {
+ need net tuncfg
+}
+
+start() {
+ check_config
+ ebegin "Starting hamachi"
+
+ start-stop-daemon --quiet --start -c "${USER}" \
+ --exec /usr/bin/hamachi -- \
+ -c "${CONFDIR}" start 2>&1 >"${LOG}"
+ result=$?
+
+ if [ ${result} -eq 0 ]; then
+ chown "${USER}:${GROUP}" "${CONFDIR}"/ipc_sock
+ chmod g+rwx "${CONFDIR}"/ipc_sock
+
+ /usr/bin/hamachi -c "${CONFDIR}" login
+ if [ -z "$(/usr/bin/hamachi -c "${CONFDIR}" | grep 'logged in')" ]; then
+ result=1
+ /usr/bin/hamachi -c "${CONFDIR}" stop 2>&1 >"${LOG}"
+ fi
+ fi
+
+ eend ${result}
+}
+
+stop() {
+ ebegin "Stopping hamachi"
+
+ /usr/bin/hamachi -c "${CONFDIR}" logout 2>&1 >"${LOG}"
+ /usr/bin/hamachi -c "${CONFDIR}" stop 2>&1 >"${LOG}"
+
+ eend $?
+}
+
+init() {
+ ebegin "Making initial configuration"
+
+ /usr/bin/hamachi-init -c "${CONFDIR}" 2>&1 >/dev/null
+ result=$?
+ chown -R "${USER}:${GROUP}" "${CONFDIR}"
+ chmod g+rx "${CONFDIR}"
+
+ eend ${result}
+}
+
+check_config() {
+ if [ ! -d "${CONFDIR}" ]; then
+ einfo "It seems you don't have configured hamachi yet. Running init now"
+ init
+ fi
+}
+
+status() {
+ service_started "${SVCNAME}" || return 1
+ /usr/bin/hamachi -c "${CONFDIR}"
+ /usr/bin/hamachi -c "${CONFDIR}" list
+}
diff --git a/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild b/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild
new file mode 100644
index 000000000000..17be974bd25e
--- /dev/null
+++ b/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/hamachi/hamachi-0.9.9.9_p20-r3.ebuild,v 1.1 2009/07/30 10:10:11 ssuominen Exp $
+
+inherit eutils linux-info
+
+# gHamachi GUI
+
+MY_PV=${PV/_p/-}
+MY_P=${PN}-${MY_PV}-lnx
+
+DESCRIPTION="Hamachi is a secure mediated peer to peer."
+HOMEPAGE="http://hamachi.cc"
+LICENSE="as-is"
+SRC_URI=" !pentium? ( http://files.hamachi.cc/linux/${MY_P}.tar.gz )
+ pentium? ( http://files.hamachi.cc/linux/${MY_P}-pentium.tar.gz )"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="pentium"
+RESTRICT="strip mirror"
+
+# Set workdir for both hamachi versions
+if use pentium; then
+ S=${WORKDIR}/${MY_P}-pentium
+else
+ S=${WORKDIR}/${MY_P}
+fi
+
+pkg_preinst() {
+ # Add group "hamachi" & user "hamachi"
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+pkg_setup() {
+ einfo "Checking your kernel configuration for TUN/TAP support."
+ CONFIG_CHECK="TUN"
+ check_extra_config
+}
+
+src_unpack() {
+ # Unpack the correct Hamachi version
+ if use !pentium; then
+ unpack ${MY_P}.tar.gz
+ else
+ unpack ${MY_P}-pentium.tar.gz
+ fi
+}
+
+src_compile() {
+ # Compile Tuncfg
+ make -sC "${S}"/tuncfg || die "Compiling of tunecfg failed"
+}
+
+src_install() {
+ # Hamachi
+ einfo "Installing Hamachi"
+ insinto /usr/bin
+ insopts -m0755
+ doins hamachi
+ dosym /usr/bin/hamachi /usr/bin/hamachi-init
+
+ # Tuncfg
+ einfo "Installing Tuncfg"
+ insinto /usr/sbin
+ insopts -m0700
+ doins tuncfg/tuncfg
+
+ # Create log directory
+ dodir /var/log/${PN}
+
+ # Config files
+ einfo "Installing config files"
+ newinitd "${FILESDIR}"/tuncfg.initd.2 tuncfg
+ newconfd "${FILESDIR}"/hamachi.confd hamachi
+ newinitd "${FILESDIR}"/hamachi.initd hamachi
+
+ # Docs
+ dodoc CHANGES README LICENSE LICENSE.openssh LICENSE.openssl LICENSE.tuncfg
+
+}
+
+pkg_postinst() {
+ if use pentium; then
+ einfo "Remember, you set the pentium USE flag!"
+ einfo So, you installed the version for older x86 systems!
+ einfo If your CPU is greater than Intel Pentium / AMD K6,
+ einfo remove the pentium USE flag and try this version!
+ fi
+
+ if use !pentium; then
+ ewarn "If you are seeing 'illegal instruction' error when trying"
+ ewarn "to run Hamachi client, set the pentium USE flag!"
+ ewarn "It enables binaries built specifically for older"
+ ewarn "x86 platforms, like Intel Pentium or AMD K6,"
+ ewarn "with all optimizations turned off."
+ fi
+
+ einfo "To start Hamachi just type:"
+ einfo "/etc/init.d/hamachi start"
+
+ # added for bug #218481
+ einfo "If the 'hamachi' command shows no output, use the following command"
+ einfo "to extract the hamachi executable either with app-arch/upx or"
+ einfo "app-arch/upx-ucl:"
+ einfo "/opt/bin/upx -d /usr/bin/hamachi"
+}