summaryrefslogtreecommitdiff
path: root/network/miredo/miredo.SlackBuild
diff options
context:
space:
mode:
authorFridrich von Stauffenberg <cancellor2@gmail.com>2011-11-12 07:44:37 -0200
committerRobby Workman <rworkman@slackbuilds.org>2011-11-26 09:09:11 -0600
commit6234fdb9cd7062e180b0af55a8475c40f147f1f7 (patch)
treeedc932e0f88c2811963e67a705c1481b4bd397e6 /network/miredo/miredo.SlackBuild
parent3bb965a4324775e8d84b54dd79ab57651836066f (diff)
downloadslackbuilds-6234fdb9cd7062e180b0af55a8475c40f147f1f7.tar.gz
network/miredo: Added (teredo IPv6 tunneling)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/miredo/miredo.SlackBuild')
-rw-r--r--network/miredo/miredo.SlackBuild110
1 files changed, 110 insertions, 0 deletions
diff --git a/network/miredo/miredo.SlackBuild b/network/miredo/miredo.SlackBuild
new file mode 100644
index 0000000000..5e338253fa
--- /dev/null
+++ b/network/miredo/miredo.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+#
+# Slackware build script for Miredo
+#
+# Copyright 2011 Fridrich von Stauffenberg <cancellor2@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=miredo
+VERSION=1.2.4
+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" = "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
+
+if [ "${NOBODY:-no}" = "no" ]; then
+ if ! grep -q "^$PRGNAM:" /etc/passwd || ! grep -q "^$PRGNAM:" /etc/group; then
+ echo "You must have a $PRGNAM user and $PRGNAM group to run this script:"
+ echo ""
+ echo " groupadd -g 255 miredo"
+ echo " useradd -u 255 -g 255 -c \"Teredo IPv6 Tunneling\" -d /dev/null -s /bin/false miredo"
+
+ exit 1
+ fi
+ enable_user="--enable-$PRGNAM-user"
+else
+ enable_user=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux \
+ $enable_user
+
+make V=1
+make install-strip DESTDIR=$PKG
+
+install -D -m 0644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
+( cd $PKG/etc/$PRGNAM ; mv $PRGNAM.conf{,.new} )
+
+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
+
+cp ChangeLog AUTHORS THANKS COPYING INSTALL README NEWS TODO ABOUT-NLS \
+ $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}