summaryrefslogtreecommitdiffstats
path: root/source/n/openssh/openssh.SlackBuild
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/n/openssh/openssh.SlackBuild
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/n/openssh/openssh.SlackBuild')
-rwxr-xr-xsource/n/openssh/openssh.SlackBuild39
1 files changed, 29 insertions, 10 deletions
diff --git a/source/n/openssh/openssh.SlackBuild b/source/n/openssh/openssh.SlackBuild
index 4a6611327..3d0d1a986 100755
--- a/source/n/openssh/openssh.SlackBuild
+++ b/source/n/openssh/openssh.SlackBuild
@@ -2,7 +2,7 @@
# Copyright 2000 BSDi, Inc. Concord, CA, USA
# Copyright 2001, 2002, 2003, 2004 Slackware Linux, Inc. Concord, CA, USA
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,9 +28,20 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-openssh
-VERSION=${VERSION:-5.2p1}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-$(echo openssh-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
@@ -42,6 +53,8 @@ elif [ "$ARCH" = "arm" ]; then
SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
elif [ "$ARCH" = "armel" ]; then
SLKCFLAGS="-O2 -march=armv4t"
+else
+ SLKCFLAGS="-O2"
fi
# Clean target location:
@@ -51,7 +64,7 @@ mkdir -p $PKG
# Prepare the framework and extract the package:
cd $TMP
rm -rf $PKG openssh-$VERSION
-tar xjvf $CWD/openssh-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/openssh-$VERSION.tar.gz || tar xvf $CWD/openssh-$VERSION.tar.?z* || exit 1
cd openssh-$VERSION
chown -R root:root .
@@ -70,15 +83,13 @@ CFLAGS="$SLKCFLAGS" \
--with-privsep-user=sshd \
--build=$ARCH-slackware-linux
-make -j4 || exit 1
+make $NUMJOBS || make || exit 1
# Install the package:
make install DESTDIR=$PKG
-( 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 $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
@@ -107,6 +118,14 @@ cp -a \
$PKG/usr/doc/openssh-$VERSION
chmod 644 $PKG/usr/doc/openssh-$VERSION/*
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
# Install also 'ssh-copy-id' and its manpage from contrib:
( cd contrib
cp -a ssh-copy-id $PKG/usr/bin/ssh-copy-id