2009-08-26 17:00:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for x11-ssh-askpass
|
|
|
|
# Written by "Vincent Batts <vbatts@batts.mine.nu>"
|
|
|
|
|
|
|
|
VERSION=1.2.4.1
|
2011-04-25 15:37:00 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2009-08-26 17:00:38 +02:00
|
|
|
TAG=${TAG:-}
|
|
|
|
|
2011-04-25 15:37:00 +02:00
|
|
|
# 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
|
|
|
|
|
2009-08-26 17:00:38 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp}
|
|
|
|
PKG=$TMP/package-x11-ssh-askpass
|
|
|
|
|
|
|
|
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"
|
2011-04-25 15:37:00 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2009-08-26 17:00:38 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf x11-ssh-askpass-$VERSION
|
2011-04-25 15:37:00 +02:00
|
|
|
tar xvf $CWD/x11-ssh-askpass-$VERSION.tar.gz || exit 1
|
|
|
|
cd x11-ssh-askpass-$VERSION || exit 1
|
2009-08-26 17:00:38 +02:00
|
|
|
chown -R root:root .
|
|
|
|
chmod -R a-s,u+rw,go+r-w .
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--with-app-defaults-dir=/etc/X11/app-defaults
|
|
|
|
|
|
|
|
xmkmf || exit 1
|
|
|
|
make includes || exit 1
|
|
|
|
make || exit 1
|
|
|
|
make install DESTDIR=$PKG || exit 1
|
|
|
|
make install.man DESTDIR=$PKG || exit 1
|
|
|
|
|
2011-04-25 15:37:00 +02:00
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2009-08-26 17:00:38 +02:00
|
|
|
|
2011-04-25 15:37:00 +02:00
|
|
|
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
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/x11-ssh-askpass-$VERSION
|
2011-04-25 15:37:00 +02:00
|
|
|
cp -a \
|
|
|
|
README TODO ChangeLog $CWD/xprofile.sample \
|
|
|
|
$PKG/usr/doc/x11-ssh-askpass-$VERSION
|
|
|
|
chown -R root:root $PKG/usr/doc/x11-ssh-askpass-$VERSION
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2011-04-25 15:37:00 +02:00
|
|
|
/sbin/makepkg -l y -c n $TMP/x11-ssh-askpass-$VERSION-$ARCH-$BUILD.txz
|