diff options
Diffstat (limited to 'academic/glpk/glpk.SlackBuild')
-rw-r--r-- | academic/glpk/glpk.SlackBuild | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/academic/glpk/glpk.SlackBuild b/academic/glpk/glpk.SlackBuild index d664c0a55fd51..a3b6b2c57382c 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} |