diff options
Diffstat (limited to 'network/putty/putty.SlackBuild')
-rw-r--r-- | network/putty/putty.SlackBuild | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/network/putty/putty.SlackBuild b/network/putty/putty.SlackBuild index 1cb35a89fe..5568705e4e 100644 --- a/network/putty/putty.SlackBuild +++ b/network/putty/putty.SlackBuild @@ -12,6 +12,7 @@ VERSION=0.60 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -19,22 +20,29 @@ 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="" fi +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 -cd $TMP/$PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $TMP/$PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -42,18 +50,21 @@ chmod -R u+w,go+r-w,a-s . mkdir -p $PKG/usr/{bin,man/man1,doc/$PRGNAM-$VERSION/html} cd unix - -CFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --mandir=/usr/man - -make || exit 1 -make install DESTDIR=$PKG || exit 1 + CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + make + make install DESTDIR=$PKG +cd - ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) ( cd $PKG/usr/man @@ -61,10 +72,6 @@ make install DESTDIR=$PKG || exit 1 for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) -# Switch back to main source directory -cd $TMP/$PRGNAM-$VERSION - -# Copy some docs cp -a README LICENCE doc/puttydoc.txt $PKG/usr/doc/$PRGNAM-$VERSION cp -a doc/*.html $PKG/usr/doc/$PRGNAM-$VERSION/html @@ -72,4 +79,4 @@ 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 +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |