gnomad2.SlackBuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/bin/sh
  2. # Slackware build script for Gnomad2
  3. # Build script by Ron F. DeMoss, 2011-08-11
  4. PRGNAM=gnomad2
  5. VERSION=${VERSION:-2.9.6}
  6. BUILD=${BUILD:-1}
  7. TAG=${TAG:-_SBo}
  8. if [ -z "$ARCH" ]; then
  9. case "$( uname -m )" in
  10. i?86) ARCH=i486 ;;
  11. arm*) ARCH=arm ;;
  12. *) ARCH=$( uname -m ) ;;
  13. esac
  14. fi
  15. CWD=$(pwd)
  16. TMP=${TMP:-/tmp/SBo}
  17. PKG=$TMP/package-$PRGNAM
  18. OUTPUT=${OUTPUT:-/tmp}
  19. if [ "$ARCH" = "i486" ]; then
  20. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  21. LIBDIRSUFFIX=""
  22. elif [ "$ARCH" = "i686" ]; then
  23. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  24. LIBDIRSUFFIX=""
  25. elif [ "$ARCH" = "x86_64" ]; then
  26. SLKCFLAGS="-O2 -fPIC"
  27. LIBDIRSUFFIX="64"
  28. else
  29. SLKCFLAGS="-O2"
  30. LIBDIRSUFFIX=""
  31. fi
  32. set -e
  33. rm -rf $PKG
  34. mkdir -p $TMP $PKG $OUTPUT
  35. cd $TMP
  36. rm -rf $PRGNAM-$VERSION
  37. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  38. cd $PRGNAM-$VERSION
  39. chown -R root:root .
  40. chmod -R u+w,go+r-w,a-s .
  41. CFLAGS="$SLKCFLAGS" \
  42. ./configure \
  43. --prefix=/usr \
  44. --libdir=/usr/lib${LIBDIRSUFFIX} \
  45. --sysconfdir=/etc \
  46. --localstatedir=/var \
  47. --mandir=/usr/man \
  48. --build=$ARCH-slackware-linux
  49. make
  50. make install-strip DESTDIR=$PKG
  51. find $PKG/usr/man -type f -exec gzip -9 {} \;
  52. for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
  53. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  54. cp -a \
  55. AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
  56. $PKG/usr/doc/$PRGNAM-$VERSION
  57. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  58. mkdir -p $PKG/install
  59. cat $CWD/slack-desc > $PKG/install/slack-desc
  60. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  61. cd $PKG
  62. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}