network/gogoc: Added (gogo6 Freenet6 Client aka gogoCLIENT)

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
Michael Johnson 2010-08-14 15:48:04 -04:00 committed by dsomero
parent 8c8e49fd2b
commit 4effc4c545
6 changed files with 191 additions and 0 deletions

8
network/gogoc/README Normal file
View file

@ -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

26
network/gogoc/doinst.sh Normal file
View file

@ -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

View file

@ -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}

10
network/gogoc/gogoc.info Normal file
View file

@ -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"

30
network/gogoc/rc.gogoc Normal file
View file

@ -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

19
network/gogoc/slack-desc Normal file
View file

@ -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: