summaryrefslogtreecommitdiffstats
path: root/academic/units/units.SlackBuild
diff options
context:
space:
mode:
author Yalla-One <yallaone@gmail.com>2010-05-13 00:20:28 +0200
committer Robby Workman <rworkman@slackbuilds.org>2010-05-13 00:20:28 +0200
commitfc2cbafac094fd3300c248e13c7278a048f0945c (patch)
treede06770c6a37a68e5e8b8a4ab90671cbd5472f28 /academic/units/units.SlackBuild
parentbc6dd848aace5b0f303fc8def9c34a7eca0d952b (diff)
downloadslackbuilds-fc2cbafac094fd3300c248e13c7278a048f0945c.tar.gz
slackbuilds-fc2cbafac094fd3300c248e13c7278a048f0945c.tar.xz
academic/units: Updated for version 1.86
Diffstat (limited to 'academic/units/units.SlackBuild')
-rw-r--r--academic/units/units.SlackBuild20
1 files changed, 14 insertions, 6 deletions
diff --git a/academic/units/units.SlackBuild b/academic/units/units.SlackBuild
index 3c91bb940b..866af7cb5c 100644
--- a/academic/units/units.SlackBuild
+++ b/academic/units/units.SlackBuild
@@ -4,14 +4,12 @@
# Written by Yalla-One <yallaone@gmail.com>
-# Exit on most errors
-set -e
-
PRGNAM=units
VERSION=1.86
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -19,10 +17,17 @@ 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"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -36,6 +41,7 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--datadir=/usr/share/units \
--localstatedir=/var
@@ -44,8 +50,10 @@ 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
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ 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
)
( cd $PKG/usr/man
@@ -64,4 +72,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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}