diff options
author | Menno Duursma <druiloor@zonnet.nl> | 2010-07-30 05:04:22 -0500 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2010-07-31 22:31:51 -0500 |
commit | dd5d615ca9f7f0edc939d34a5bafa0cd70fbbc07 (patch) | |
tree | 2e4eb943ea3ee1949ec551db9444b72575a725d8 /network/lsh/lsh.SlackBuild | |
parent | 46aed99b456aeea560b9068199af8364b6918dc6 (diff) | |
download | slackbuilds-dd5d615ca9f7f0edc939d34a5bafa0cd70fbbc07.tar.gz |
network/lsh: Added (GNU implementation of the Secure Shell protocol)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/lsh/lsh.SlackBuild')
-rw-r--r-- | network/lsh/lsh.SlackBuild | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/network/lsh/lsh.SlackBuild b/network/lsh/lsh.SlackBuild new file mode 100644 index 0000000000..986ed6311f --- /dev/null +++ b/network/lsh/lsh.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/sh + +# Slackware build script for LSH + +# Written by Menno Duursma <druiloor@zonnet.nl> + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +PRGNAM=lsh +VERSION=${VERSION:-2.0.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 + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +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 -lwrap -lnsl" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --disable-gss \ + --disable-kerberos \ + --disable-pam \ + --with-tcpwrappers \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG + +# Add the the init script +install -D -m755 contrib/lshd.rhlinux.init $PKG/etc/rc.d/rc.lshd.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 + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + ANNOUNCE AUTHORS COPYING ChangeLog* FAQ INSTALL NEWS README distribution-key.gpg \ + $PKG/usr/doc/$PRGNAM-$VERSION +cd doc + cp -a \ + HACKING NOTES PORTS TASKLIST TODO configuration.txt gateway-mode.txt srp-spec.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cd .. +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html +cp doc/lsh.html $PKG/usr/doc/$PRGNAM-$VERSION/html +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} |