summaryrefslogtreecommitdiff
path: root/network/dropbear/dropbear.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/dropbear/dropbear.SlackBuild')
-rw-r--r--network/dropbear/dropbear.SlackBuild47
1 files changed, 28 insertions, 19 deletions
diff --git a/network/dropbear/dropbear.SlackBuild b/network/dropbear/dropbear.SlackBuild
index 0419cf8d49..017fffba47 100644
--- a/network/dropbear/dropbear.SlackBuild
+++ b/network/dropbear/dropbear.SlackBuild
@@ -21,9 +21,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=dropbear
-VERSION=0.50
+VERSION=0.52
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -33,18 +33,23 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -55,6 +60,8 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --bindir=/usr/sbin \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--disable-syslog \
--disable-utmp \
--disable-utmpx \
@@ -64,41 +71,43 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-pututxline \
--build=$ARCH-slackware-linux
-make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI="1" || exit 1
-make DESTDIR=$PKG MULTI="1" install || exit 1
-
-mkdir $PKG/usr/sbin
+make \
+ PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
+ MULTI="1"
+make install \
+ MULTI="1" \
+ DESTDIR=$PKG
# Copy manpages to package
mkdir -p $PKG/usr/man/man{1,8}
cp dbclient.1 $PKG/usr/man/man1
cp dropbearkey.8 dropbear.8 $PKG/usr/man/man8
-if [ -d $PKG/usr/man ]; then
( 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
+ for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
-fi
# Link binaries to dropbearmulti
-cd $PKG/usr/bin
- ln -s ../bin/dropbearmulti ../sbin/dropbear
+mkdir $PKG/usr/sbin
+( cd $PKG/usr/sbin ; ln -s ../bin/dropbearmulti dropbear )
+( cd $PKG/usr/bin
for i in dbclient dropbearkey dropbearconvert scp ; do
- ln -s dropbearmulti $i
+ ln -s dropbearmulti $i ;
done
-cd -
+)
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.dropbear.new > $PKG/etc/rc.d/rc.dropbear.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES INSTALL LICENSE MULTI README SMALL TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CHANGES INSTALL LICENSE MULTI README SMALL TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
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.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}