aboutsummaryrefslogtreecommitdiff
path: root/network/putty/putty.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/putty/putty.SlackBuild')
-rw-r--r--network/putty/putty.SlackBuild85
1 files changed, 85 insertions, 0 deletions
diff --git a/network/putty/putty.SlackBuild b/network/putty/putty.SlackBuild
new file mode 100644
index 0000000000000..9ad27836a56dd
--- /dev/null
+++ b/network/putty/putty.SlackBuild
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+# Slackware build script for PuTTY
+
+# Written by <youngmug@animeneko.net>
+
+# Modified by Michael Wagner <lapinours@web.de>
+# as putty now uses autoconf.
+
+PRGNAM=putty
+VERSION=0.60
+BUILD=${BUILD:-2}
+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" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "alpha" ]; then
+ SLKCFLAGS="-O2 -mcpu=ev4"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $TMP/$PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Create $PKG tree.
+mkdir -p $PKG/usr/{bin,man/man1,doc/$PRGNAM-$VERSION/html}
+
+cd unix
+ CFLAGS="$SLKCFLAGS -Wno-strict-aliasing" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+ make
+ make install DESTDIR=$PKG
+cd -
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+cp -a README LICENCE doc/puttydoc.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION/html
+
+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.${PKGTYPE:-tgz}