summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 14:49:18 +0100
committerJason A. Donenfeld <zx2c4@gentoo.org>2017-03-17 14:56:14 +0100
commit7f68c86d93d5f69d775bceb3941b3a3b46672eb1 (patch)
treeb461a335b70f8d07bda55ab1e3cc54fbd568a097 /net-vpn/logmein-hamachi
parentdev-ruby/nexpose: Initial version (diff)
downloadgentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.gz
gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.tar.bz2
gentoo-7f68c86d93d5f69d775bceb3941b3a3b46672eb1.zip
Move VPN packages into net-vpn/
Diffstat (limited to 'net-vpn/logmein-hamachi')
-rw-r--r--net-vpn/logmein-hamachi/Manifest4
-rw-r--r--net-vpn/logmein-hamachi/files/logmein-hamachi.confd15
-rw-r--r--net-vpn/logmein-hamachi/files/logmein-hamachi.initd77
-rw-r--r--net-vpn/logmein-hamachi/files/logmein-hamachi.service10
-rw-r--r--net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild64
-rw-r--r--net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.174.ebuild64
-rw-r--r--net-vpn/logmein-hamachi/metadata.xml12
7 files changed, 246 insertions, 0 deletions
diff --git a/net-vpn/logmein-hamachi/Manifest b/net-vpn/logmein-hamachi/Manifest
new file mode 100644
index 000000000000..8c17adedb56f
--- /dev/null
+++ b/net-vpn/logmein-hamachi/Manifest
@@ -0,0 +1,4 @@
+DIST logmein-hamachi-2.1.0.139-x64.tgz 1329615 SHA256 2eda310852e09f34439e8afeeba1614e62a1e91e5aa3947ba530de7c8b5a3ac9 SHA512 e4c0a3de2361f707dfbe168bfa90543f139082624c04b121f3186ecb10aa56a9e9e942989cd1148d6a4fcabedba172bb1196206c14a1124b32d20154ee4be177 WHIRLPOOL f2e890945ccdf48ef409a145037de8a08e310928183c6cf7a2fb1c0f80f6143c4d4e98f88cdf54e754bea27dd1f1fd1fda844a33e702cf4171a2eacaeef08dbc
+DIST logmein-hamachi-2.1.0.139-x86.tgz 1254911 SHA256 103de9c76aceff78ce039dd48e7a71f43a627d833e58b63317e75ab1e2331d80 SHA512 49e5b57563e1599a71bc543c81bb1355b210d432a1daaf3975a1625aafd1cd46233fe8a1914d9309d8116d597abc42cd8cfd75e0729eed4bc379eaab30c808e4 WHIRLPOOL bb014a77f272589a93caadbf162696326849fa8b2398a4a768ab0adf685678debffada0db5a5dbd037afc0141cf771eff15ef13c7c4e91616c1c64df8b5306d5
+DIST logmein-hamachi-2.1.0.174-x64.tgz 1367599 SHA256 43922be24a3eeb311d7ac277d355d886e6033d506df820bfd95b49985d783d04 SHA512 d1d81a15f209361f66636035f7fd8a010657dbc0712a56ae240e102f083e9b04629c852cbd4259229166c297a1cd116da07e5bdeac63795cacba8fd7e3021050 WHIRLPOOL da490120e478e1a0977d46d183b810ba4cf26543029d0ff9c9fb6e3fb560cf75c1d5c8ccf07af8c8361c9495bcea388d9c6ea76838dd72d7e7d5801ac82619de
+DIST logmein-hamachi-2.1.0.174-x86.tgz 1290587 SHA256 c230cb43d1ed8a75396a5fce34f0e1bbcf1f5610f9baf3814ba9ce14764fb40e SHA512 0f8da40d6508dab71680a74065649d51288c345849f74c7e2682040b720536f5324d142690aa879f9c5e8f1717654ab93357f4b960a567f5b584609bd814e82f WHIRLPOOL 54fad0e09ba06e28fd487eb99de8364ef7432140f5c217384b85c44d72a332f7431148c0fc7a10700093e4964cc46c156223c9e972fea8fe04c6dbd2c59f3857
diff --git a/net-vpn/logmein-hamachi/files/logmein-hamachi.confd b/net-vpn/logmein-hamachi/files/logmein-hamachi.confd
new file mode 100644
index 000000000000..73523ee3e3de
--- /dev/null
+++ b/net-vpn/logmein-hamachi/files/logmein-hamachi.confd
@@ -0,0 +1,15 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# /etc/conf.d/logmein-hamachi
+# Config file for logmein-hamachi control script
+
+# Location of config, identity and log files
+CONFDIR="/var/lib/logmein-hamachi"
+
+# Your nickname
+# Set it to enable auto-login when starting the service
+NICKNAME=""
+
+# Seconds to wait before auto-login (if enabled)
+WAIT="2"
diff --git a/net-vpn/logmein-hamachi/files/logmein-hamachi.initd b/net-vpn/logmein-hamachi/files/logmein-hamachi.initd
new file mode 100644
index 000000000000..4bff7452ebcc
--- /dev/null
+++ b/net-vpn/logmein-hamachi/files/logmein-hamachi.initd
@@ -0,0 +1,77 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/opt/logmein-hamachi/bin/hamachid
+PIDFILE=/var/run/logmein-hamachi/hamachid.pid
+
+depend() {
+ need net
+}
+
+checktun() {
+ [ $(uname -s) = "Linux" ] || return 0
+ [ -e /dev/net/tun ] && return 0
+ modprobe tun && return 0
+
+ eerror "TUN/TAP support is not available in the running kernel"
+ return 1
+}
+
+start_pre() {
+ checkpath -d /var/run/logmein-hamachi
+}
+
+start()
+{
+ # returns
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ checktun || return 2
+
+ ebegin "Starting hamachi"
+
+ start-stop-daemon --quiet --start --exec "${DAEMON}" \
+ --pidfile "${PIDFILE}" -- -c "${CONFDIR}"
+ result=$?
+
+ if [ ${result} -eq 0 ] && [ -n "${NICKNAME}" ]; then
+ # it fails logging in immediately
+ sleep ${WAIT}
+ /usr/bin/hamachi login
+ if [ -z "$(/usr/bin/hamachi | grep 'logged in')" ]; then
+ start-stop-daemon --quiet --stop \
+ --exec "${DAEMON}" --pidfile "${PIDFILE}"
+ result=1
+ else
+ /usr/bin/hamachi set-nick "${NICKNAME}"
+ fi
+ fi
+
+ eend ${result}
+}
+
+stop()
+{
+ # returns
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ ebegin "Stopping hamachi"
+
+ /usr/bin/hamachi logout
+ start-stop-daemon --quiet --stop --exec "${DAEMON}" \
+ --pidfile "${PIDFILE}"
+
+ eend $?
+}
+
+status() {
+ service_started "${SVCNAME}" || return 1
+ /usr/bin/hamachi
+ /usr/bin/hamachi list
+}
diff --git a/net-vpn/logmein-hamachi/files/logmein-hamachi.service b/net-vpn/logmein-hamachi/files/logmein-hamachi.service
new file mode 100644
index 000000000000..609447e16373
--- /dev/null
+++ b/net-vpn/logmein-hamachi/files/logmein-hamachi.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=LogMeIn Hamachi daemon
+After=local-fs.target network.target
+
+[Service]
+ExecStart=/opt/logmein-hamachi/bin/hamachid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild b/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild
new file mode 100644
index 000000000000..719f37c44aae
--- /dev/null
+++ b/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.139.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils linux-info systemd
+
+DESCRIPTION="LogMeIn Hamachi VPN tunneling engine"
+HOMEPAGE="https://secure.logmein.com/products/hamachi"
+SRC_URI="x86? ( https://secure.logmein.com/labs/${P}-x86.tgz )
+ amd64? ( https://secure.logmein.com/labs/${P}-x64.tgz )"
+
+LICENSE="LogMeIn"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!net-misc/hamachi"
+
+RESTRICT="mirror"
+
+QA_PREBUILT="/opt/${PN}/bin/hamachid"
+QA_PRESTRIPPED="/opt/${PN}/bin/hamachid"
+QA_WX_LOAD="/opt/${PN}/bin/hamachid"
+
+pkg_setup() {
+ einfo "Checking your kernel configuration for TUN/TAP support."
+ CONFIG_CHECK="~TUN"
+ check_extra_config
+}
+
+src_unpack() {
+ unpack ${A}
+ mv "${P}-$(use x86 && echo x86 || echo x64)" "${S}" || die
+}
+
+src_install() {
+ into /opt/${PN}
+ dobin hamachid dnsup dnsdown
+ dosym /opt/${PN}/bin/hamachid /usr/bin/hamachi
+
+ # Config and log directory
+ dodir /var/lib/${PN}
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ dodoc CHANGES README
+}
+
+pkg_postinst() {
+ elog "LogMeIn Hamachi2 is installed."
+ elog "Consult the README file on how to configure your client."
+ elog "You can run the client 'hamachi' as root,"
+ elog "or as a user if you add a newline terminated line:"
+ elog "Ipc.User <login name>"
+ elog "to the file '/var/lib/${PN}/h2-engine-override.cfg'"
+ elog "and restart the daemon with"
+ elog "/etc/init.d/${PN} restart"
+ elog "or:"
+ elog "systemctl restart ${PN}"
+ elog "To enable auto-login when the service starts set a nickname in"
+ elog "/etc/conf.d/${PN} (only supported using openRC)"
+}
diff --git a/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.174.ebuild b/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.174.ebuild
new file mode 100644
index 000000000000..d340b702289f
--- /dev/null
+++ b/net-vpn/logmein-hamachi/logmein-hamachi-2.1.0.174.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit linux-info systemd
+
+DESCRIPTION="LogMeIn Hamachi VPN tunneling engine"
+HOMEPAGE="https://www.vpn.net/"
+SRC_URI="x86? ( https://www.vpn.net/installers/${P}-x86.tgz )
+ amd64? ( https://www.vpn.net/installers/${P}-x64.tgz )"
+
+LICENSE="LogMeIn"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE=""
+
+RDEPEND="!net-misc/hamachi"
+
+RESTRICT="mirror"
+
+QA_PREBUILT="/opt/${PN}/bin/hamachid"
+QA_PRESTRIPPED="/opt/${PN}/bin/hamachid"
+QA_WX_LOAD="/opt/${PN}/bin/hamachid"
+
+pkg_setup() {
+ einfo "Checking your kernel configuration for TUN/TAP support."
+ CONFIG_CHECK="~TUN"
+ check_extra_config
+}
+
+src_unpack() {
+ unpack ${A}
+ mv "${P}-$(use x86 && echo x86 || echo x64)" "${S}" || die
+}
+
+src_install() {
+ into /opt/${PN}
+ dobin hamachid dnsup dnsdown
+ dosym /opt/${PN}/bin/hamachid /usr/bin/hamachi
+
+ # Config and log directory
+ dodir /var/lib/${PN}
+
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ dodoc CHANGES README
+}
+
+pkg_postinst() {
+ elog "LogMeIn Hamachi2 is installed."
+ elog "Consult the README file on how to configure your client."
+ elog "You can run the client 'hamachi' as root,"
+ elog "or as a user if you add a newline terminated line:"
+ elog "Ipc.User <login name>"
+ elog "to the file '/var/lib/${PN}/h2-engine-override.cfg'"
+ elog "and restart the daemon with"
+ elog "/etc/init.d/${PN} restart"
+ elog "or:"
+ elog "systemctl restart ${PN}"
+ elog "To enable auto-login when the service starts set a nickname in"
+ elog "/etc/conf.d/${PN} (only supported using openRC)"
+}
diff --git a/net-vpn/logmein-hamachi/metadata.xml b/net-vpn/logmein-hamachi/metadata.xml
new file mode 100644
index 000000000000..14dde2333ec1
--- /dev/null
+++ b/net-vpn/logmein-hamachi/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nonno.cicala@libero.it</email>
+ <name>Simone Scanzoni</name>
+ </maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>