summaryrefslogtreecommitdiff
path: root/academic/glpk/glpk.SlackBuild
diff options
context:
space:
mode:
authorChris Abela <chris.abela@maltats.com>2010-05-13 00:20:01 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-13 00:20:01 +0200
commite39519d57f50c168b231a6cca11671d2db0e6c96 (patch)
tree3b6183886775f187a937cc98a09e2f14c7cda5e9 /academic/glpk/glpk.SlackBuild
parente2ab4e5cbda35831a4d6be8cf427af4ac94168d2 (diff)
downloadslackbuilds-e39519d57f50c168b231a6cca11671d2db0e6c96.tar.gz
academic/glpk: Updated for version 4.40
Diffstat (limited to 'academic/glpk/glpk.SlackBuild')
-rw-r--r--academic/glpk/glpk.SlackBuild37
1 files changed, 23 insertions, 14 deletions
diff --git a/academic/glpk/glpk.SlackBuild b/academic/glpk/glpk.SlackBuild
index d664c0a55f..a3b6b2c573 100644
--- a/academic/glpk/glpk.SlackBuild
+++ b/academic/glpk/glpk.SlackBuild
@@ -1,10 +1,10 @@
#!/bin/sh
# Slackware build script for glpk
# Written by Chris Abela <chris.abela@maltats.com>
-# January 2008
+# September 2009
PRGNAM=glpk
-VERSION=${VERSION:-4.34}
+VERSION=${VERSION:-4.40}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,10 +16,13 @@ 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
@@ -41,26 +44,32 @@ CFLAGS="$SLKCFLAGS" \
LDFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --enable-dl \
- --program-prefix= \
- --program-suffix= \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
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
-)
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS doc/* examples \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# A file in the $PKG/usr/doc/$PRGNAM-$VERSION can be stripped,
+# so we strip here, rather than immediately after make install.
+( 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
+)
+
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}