From 00549051450f13800ace57ec6415ef5629d41546 Mon Sep 17 00:00:00 2001 From: Adam Swift Date: Sun, 6 Mar 2011 12:09:10 -0300 Subject: network/hamachi: Added (LogMeIn VPN client) Signed-off-by: Niels Horn --- network/hamachi/README | 45 ++++++++++++++++++++++++++ network/hamachi/doinst.sh | 2 ++ network/hamachi/hamachi.SlackBuild | 65 ++++++++++++++++++++++++++++++++++++++ network/hamachi/hamachi.info | 10 ++++++ network/hamachi/rc.hamachi | 36 +++++++++++++++++++++ network/hamachi/slack-desc | 19 +++++++++++ 6 files changed, 177 insertions(+) create mode 100644 network/hamachi/README create mode 100644 network/hamachi/doinst.sh create mode 100644 network/hamachi/hamachi.SlackBuild create mode 100644 network/hamachi/hamachi.info create mode 100644 network/hamachi/rc.hamachi create mode 100644 network/hamachi/slack-desc (limited to 'network/hamachi') diff --git a/network/hamachi/README b/network/hamachi/README new file mode 100644 index 0000000000..cc32ec2016 --- /dev/null +++ b/network/hamachi/README @@ -0,0 +1,45 @@ +LogMeIn Hamachi2 is a hosted VPN service that securely connects devices and +networks, extending LAN-like network connectivity to mobile users, +distributed teams and business applications. You can easily create secure +virtual networks on demand, across public and private networks. + +Linux beta binary blob from https://secure.logmein.com/US/labs/ + +This requires the "tun" driver to be built into the kernel or available as +a module- not a problem for Slackware (indeed, most) kernels. + +Provided is a sample rc.d script, /etc/rc.d/rc.d/rc.hamachi, to start the +Hamachi2 daemon. To run it on boot, make it executable with + + chmod +x /etc/rc.d/rc.hamachi + +and add the following to /etc/rc.d/rc.local: + + if [ -x /etc/rc.d/rc.hamachi ]; then + . /etc/rc.d/rc.hamachi start + fi + +Hamachi2 writes its configuration information to /var/lib/logmein-hamachi. +To modify the server configuration, add your parameters to +/var/lib/logmein-hamachi/h2-engine-override.cfg and restart the daemon with +/etc/rc.d/rc.hamachi restart. Parameters you can change (in fact, the +daemon's current configuration) are listed in h2-engine.cfg in this +directory. + +Example /var/lib/logmein-hamachi/h2-engine-override.cfg: + + Conn.DisableUpnp 1 + Ipc.User vike + Sock.TcpAddr 192.168.1.33 + Sock.TcpPort 51232 + Sock.UdpAddr 192.168.1.33 + Sock.UdpPort 51232 + +This config allows the user vike to use the hamachi command for controlling +the vpn. It also disables UPnP for negotiation of the hamachi listen socket +and forces it to the address and port listed. This is useful when you are +willing to do a port forward yourself, because UPnP can be unreliable. + +For more information run the hamachi command without parameters and see +/usr/doc/hamachi-/README. + diff --git a/network/hamachi/doinst.sh b/network/hamachi/doinst.sh new file mode 100644 index 0000000000..19776ff43a --- /dev/null +++ b/network/hamachi/doinst.sh @@ -0,0 +1,2 @@ +/usr/bin/ln -sf /usr/share/hamachi/hamachid /usr/bin/hamachi + diff --git a/network/hamachi/hamachi.SlackBuild b/network/hamachi/hamachi.SlackBuild new file mode 100644 index 0000000000..44b79dd80c --- /dev/null +++ b/network/hamachi/hamachi.SlackBuild @@ -0,0 +1,65 @@ +#!/bin/sh + +# Slackware build script for hamachi + +# Written by Adam Swift vikepack@omnitude.net + +PRGNAM=hamachi +SRCPKGNAM=logmein-$PRGNAM +VERSION=${VERSION:-2.0.1.13} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" + SRCPKGSUFFIX="x64" +else + LIBDIRSUFFIX="" + SRCPKGSUFFIX="x86" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCPKGNAM-$VERSION-$SRCPKGSUFFIX +tar xvf $CWD/$SRCPKGNAM-$VERSION-$SRCPKGSUFFIX.tgz +cd $SRCPKGNAM-$VERSION-$SRCPKGSUFFIX +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +mkdir -p $PKG/usr/share/$PRGNAM +cp -a hamachid dnsup dnsdown $PKG/usr/share/$PRGNAM + +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.hamachi > $PKG/etc/rc.d/rc.hamachi + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README CHANGES LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} + diff --git a/network/hamachi/hamachi.info b/network/hamachi/hamachi.info new file mode 100644 index 0000000000..a7c6fdc5e0 --- /dev/null +++ b/network/hamachi/hamachi.info @@ -0,0 +1,10 @@ +PRGNAM="hamachi" +VERSION="2.0.1.13" +HOMEPAGE="https://secure.logmein.com/US/labs/" +DOWNLOAD="https://secure.logmein.com/labs/logmein-hamachi-2.0.1.13-x86.tgz" +MD5SUM="96c8354d0881b531927fb7603fb7895b" +DOWNLOAD_x86_64="https://secure.logmein.com/labs/logmein-hamachi-2.0.1.13-x64.tgz" +MD5SUM_x86_64="a285d9baec2ee60f2c8f151fd1e46ff2" +MAINTAINER="Adam Swift" +EMAIL="vikepack@omnitude.net" +APPROVED="Niels Horn" diff --git a/network/hamachi/rc.hamachi b/network/hamachi/rc.hamachi new file mode 100644 index 0000000000..a3398f1051 --- /dev/null +++ b/network/hamachi/rc.hamachi @@ -0,0 +1,36 @@ +#!/bin/bash +# Start/stop/restart the hamachi "zero-conf" VPN service +HAMACHI_DIR=/usr/share/hamachi + +hamachi_start() { + # ensure the tun driver is loaded- hamachi fails to start if it is not + /sbin/modprobe tun + $HAMACHI_DIR/hamachid +} + +hamachi_stop() { + if [ -e "/var/run/logmein-hamachi/hamachid.pid" ]; then + kill `cat /var/run/logmein-hamachi/hamachid.pid` + fi +} + +hamachi_restart() { + hamachi_stop + sleep 1 + hamachi_start +} + +case "$1" in +'start') + hamachi_start + ;; +'stop') + hamachi_stop + ;; +'restart') + hamachi_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac + diff --git a/network/hamachi/slack-desc b/network/hamachi/slack-desc new file mode 100644 index 0000000000..14dc047add --- /dev/null +++ b/network/hamachi/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +hamachi: Hamachi2 (LogMeIn VPN client) +hamachi: +hamachi: LogMeIn Hamachi2 is a hosted VPN service that securely connects +hamachi: devices and networks, extending LAN-like network connectivity to +hamachi: mobile users, distributed teams and business applications. You can +hamachi: easily create secure virtual networks on demand, across public and +hamachi: private networks. +hamachi: +hamachi: Linux beta binary blob from https://secure.logmein.com/US/labs/ +hamachi: +hamachi: -- cgit v1.2.3