diff options
author | Jonathan Larsen <agentc0re@learnix.net> | 2010-05-12 23:32:49 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-12 23:32:49 +0200 |
commit | edf35a62ae5790efd15ad263724755ff10f462e5 (patch) | |
tree | 47730cbffe52e0a3d0bce88675603ede2a121d5a /network/strongswan | |
parent | ac23f7579cef7d587954ae36544a421fcac769ba (diff) |
network/strongswan: Added to 12.2 repository
Diffstat (limited to 'network/strongswan')
-rw-r--r-- | network/strongswan/README | 1 | ||||
-rw-r--r-- | network/strongswan/doinst.sh | 15 | ||||
-rw-r--r-- | network/strongswan/slack-desc | 19 | ||||
-rw-r--r-- | network/strongswan/strongswan.SlackBuild | 101 | ||||
-rw-r--r-- | network/strongswan/strongswan.info | 8 |
5 files changed, 144 insertions, 0 deletions
diff --git a/network/strongswan/README b/network/strongswan/README new file mode 100644 index 000000000000..1a0cf76c9c74 --- /dev/null +++ b/network/strongswan/README @@ -0,0 +1 @@ +strongSwan is an OpenSource IPsec implementation for Linux. diff --git a/network/strongswan/doinst.sh b/network/strongswan/doinst.sh new file mode 100644 index 000000000000..760618d9b9a5 --- /dev/null +++ b/network/strongswan/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +config etc/ipsec.conf.new +config etc/strongswan.conf.new + diff --git a/network/strongswan/slack-desc b/network/strongswan/slack-desc new file mode 100644 index 000000000000..b2cdb4a70f1c --- /dev/null +++ b/network/strongswan/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 ':'. + + |-----handy-ruler------------------------------------------------------| +strongswan: strongswan (ipsec-based VPN) +strongswan: +strongswan: strongSwan is an open source IPsec-based VPN Solution for Linux. +strongswan: +strongswan: This build includes Cisco quirks. +strongswan: +strongswan: +strongswan: +strongswan: +strongswan: +strongswan: diff --git a/network/strongswan/strongswan.SlackBuild b/network/strongswan/strongswan.SlackBuild new file mode 100644 index 000000000000..2e706d668988 --- /dev/null +++ b/network/strongswan/strongswan.SlackBuild @@ -0,0 +1,101 @@ +#!/bin/bash + +# Copyright 2009, Jonathan Larsen (agentc0re), SLC, UT +# Contact Info: agentc0re 'AT' learnix 'DOT' net +# 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=strongswan +VERSION=4.2.14 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +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 . +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 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --enable-cisco-quirks \ + --enable-shared \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +# Don't clobber existing config files +mv $PKG/etc/ipsec.conf $PKG/etc/ipsec.conf.new +mv $PKG/etc/strongswan.conf $PKG/etc/strongswan.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cd $TMP/$PRGNAM-$VERSION +cp -a \ + AUTHORS COPYING CREDITS ChangeLog INSTALL NEWS README TODO \ + $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/network/strongswan/strongswan.info b/network/strongswan/strongswan.info new file mode 100644 index 000000000000..9d2e6fae0c4d --- /dev/null +++ b/network/strongswan/strongswan.info @@ -0,0 +1,8 @@ +PRGNAM="strongswan" +VERSION="4.2.14" +HOMEPAGE="http://www.strongswan.org/index.htm" +DOWNLOAD="http://download.strongswan.org/strongswan-4.2.14.tar.bz2" +MD5SUM="8aaa5604e2093db07520d6ba50bef931" +MAINTAINER="Jonathan Larsen (agentc0re)" +EMAIL="agentc0re@learnix.net" +APPROVED="rworkman" |