summaryrefslogtreecommitdiff
path: root/network/gogoc
diff options
context:
space:
mode:
Diffstat (limited to 'network/gogoc')
-rw-r--r--network/gogoc/README8
-rw-r--r--network/gogoc/doinst.sh26
-rw-r--r--network/gogoc/gogoc.SlackBuild98
-rw-r--r--network/gogoc/gogoc.info10
-rw-r--r--network/gogoc/rc.gogoc30
-rw-r--r--network/gogoc/slack-desc19
6 files changed, 191 insertions, 0 deletions
diff --git a/network/gogoc/README b/network/gogoc/README
new file mode 100644
index 0000000000..b0dd1a2c93
--- /dev/null
+++ b/network/gogoc/README
@@ -0,0 +1,8 @@
+This software allows you to create and maintain an IPv6 tunnel if you don't
+have native IPv6 connectivity.
+
+If you wish to maintain a static IPv6 address, you *must* register a Freenet6
+account and edit /etc/gogoc.conf with the account you configured.
+
+Information on the Freenet6 tunnelbroker and a link to the registration process
+is at http://gogonet.gogo6.com/page/freenet6-tunnelbroker
diff --git a/network/gogoc/doinst.sh b/network/gogoc/doinst.sh
new file mode 100644
index 0000000000..5af6814970
--- /dev/null
+++ b/network/gogoc/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.gogoc.new
+config etc/gogoc.new
diff --git a/network/gogoc/gogoc.SlackBuild b/network/gogoc/gogoc.SlackBuild
new file mode 100644
index 0000000000..3a310825e1
--- /dev/null
+++ b/network/gogoc/gogoc.SlackBuild
@@ -0,0 +1,98 @@
+#!/bin/sh
+
+# Slackware build script for gogoCLIENT (gogoc)
+
+# Written by Michael Johnson <youngmug@animeneko.net>
+
+PRGNAM=gogoc
+VERSION=${VERSION:-1.2_RELEASE}
+TARVERSION=${TARVERSION:-1_2-RELEASE}
+BUILD=${BUILD:-2}
+TAG=${TAG:-_SBo}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$TARVERSION
+tar xvf $CWD/$PRGNAM-$TARVERSION.tar.gz
+cd $PRGNAM-$TARVERSION
+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 {} \;
+
+make
+make installdir=$PKG/usr install
+
+# Copy run script into package destination
+mkdir -p $PKG/etc/rc.d
+cp $CWD/rc.gogoc $PKG/etc/rc.d/rc.gogoc.new
+
+# Move config file into /etc
+( cd $PKG
+ mv usr/bin/gogoc.conf etc/gogoc.conf.new
+ rm usr/bin/gogoc.conf.sample
+# Move template area into /var/lib
+ mkdir -p var/lib/gogoc
+ mv usr/template var/lib/gogoc/
+)
+
+# Fix config file
+sed -e "s+$PKG/usr+/var/lib/gogoc+" -i $PKG/etc/gogoc.conf.new
+
+# Strip binaries and libraries
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress man pages
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Copy the slack-desc and a custom doinst.sh into ./install
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CLIENT-LICENSE.TXT GUI-LICENSE.TXT INSTALL README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Make the package
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/gogoc/gogoc.info b/network/gogoc/gogoc.info
new file mode 100644
index 0000000000..85d6bf002b
--- /dev/null
+++ b/network/gogoc/gogoc.info
@@ -0,0 +1,10 @@
+PRGNAM="gogoc"
+VERSION="1.2_RELEASE"
+HOMEPAGE="homepage of application"
+DOWNLOAD="http://gogo6.com/downloads/gogoc-1_2-RELEASE.tar.gz"
+MD5SUM="41177ed683cf511cc206c7782c37baa9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Michael Johnson"
+EMAIL="youngmug@animeneko.net"
+APPROVED="dsomero"
diff --git a/network/gogoc/rc.gogoc b/network/gogoc/rc.gogoc
new file mode 100644
index 0000000000..b76fdf5edb
--- /dev/null
+++ b/network/gogoc/rc.gogoc
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Start/stop/restart the Freenet6 Client
+
+# Comment this out if you don't want the client to auto-accept the server cert
+AUTOACCEPT="-y"
+
+
+gogoc_start() {
+ /usr/bin/gogoc -b -f /etc/gogoc.conf $AUTOACCEPT
+}
+
+gogoc_stop() {
+ killall gogoc
+}
+
+case "$1" in
+'start')
+ gogoc_start
+ ;;
+'stop')
+ gogoc_stop
+ ;;
+'restart')
+ gogoc_stop
+ gogoc_start
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
+
diff --git a/network/gogoc/slack-desc b/network/gogoc/slack-desc
new file mode 100644
index 0000000000..4e4ecb4ea6
--- /dev/null
+++ b/network/gogoc/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------------------------------------------------------|
+gogoc: gogoc (gogo6 Freenet6 Client aka gogoCLIENT)
+gogoc:
+gogoc: The Freenet6 Client allows connection to gogo6's Freenet6 service.
+gogoc:
+gogoc: Freenet6 Tunneling is an IPv6 access service offered to the community
+gogoc: for free. This service enables thousands of people from all over the
+gogoc: world to experience the best solution for a smooth and incremental
+gogoc: deployment of IPv6. Freenet6 users can get IPv6 connectivity from
+gogoc: anywhere, including from behind any NAT device or from outside
+gogoc: of their home network.
+gogoc: