summaryrefslogtreecommitdiffstats
path: root/system/pwgen/pwgen.SlackBuild
diff options
context:
space:
mode:
author Timothy Pollard <sbo@timp.com.au>2010-05-13 00:41:31 +0200
committer Robby Workman <rworkman@slackbuilds.org>2010-05-13 00:41:31 +0200
commit36c1238d8bf2081c43eea3e36551dcc1918f8f38 (patch)
tree09b1083f0069b37af871b1f16b784ce6e3a46f41 /system/pwgen/pwgen.SlackBuild
parent887fa6cd8e37c9f3e58aac8a7fe05892236785b9 (diff)
downloadslackbuilds-36c1238d8bf2081c43eea3e36551dcc1918f8f38.tar.gz
slackbuilds-36c1238d8bf2081c43eea3e36551dcc1918f8f38.tar.xz
system/pwgen: Updated for version 2.06
Diffstat (limited to 'system/pwgen/pwgen.SlackBuild')
-rw-r--r--system/pwgen/pwgen.SlackBuild65
1 files changed, 36 insertions, 29 deletions
diff --git a/system/pwgen/pwgen.SlackBuild b/system/pwgen/pwgen.SlackBuild
index 4ad5ec9815..ccfe396767 100644
--- a/system/pwgen/pwgen.SlackBuild
+++ b/system/pwgen/pwgen.SlackBuild
@@ -1,9 +1,8 @@
#!/bin/sh
-#
+
# A slackbuild script for pwgen
-#
+
# Copyright (c) 2007, Timothy Pollard
-#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
@@ -35,35 +34,58 @@ VERSION=2.06
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$APP
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-02 -march=i486 -mtune=i486"
+ SLKCFLAGS="-O2 -march=i486 -mtune=i486"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-02 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG $TMP/$APP-$VERSION
mkdir -p $TMP $PKG $OUTPUT
-
-cd $TMP || exit 1
-tar -xzvf $CWD/$APP-$VERSION.tar.gz || exit 1
-cd $APP-$VERSION || exit 1
+cd $TMP
+tar xvf $CWD/$APP-$VERSION.tar.gz
+cd $APP-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- || exit
+ --build=$ARCH-slackware-linux
-make || exit
-make install DESTDIR=$PKG || exit
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : \
+ | xargs strip -- strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : \
+ | xargs strip -- strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man || exit 1
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ); do
+ ln -s $( readlink $i ).gz $i.gz;
+ rm $i;
+ done
+)
mkdir -p $PKG/usr/doc/$APP-$VERSION
cp -t $PKG/usr/doc/$APP-$VERSION ChangeLog
@@ -71,22 +93,7 @@ cp $CWD/$APP.SlackBuild $PKG/usr/doc/$APP-$VERSION/
find $PKG/usr/doc/$APP-$VERSION -type f -exec chmod 644 {} \;
mkdir -p $PKG/install
-cp $CWD/slack-desc $PKG/install/
-
-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
-
-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
-fi
+cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$APP-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$APP-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}