mhwaveedit.SlackBuild 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/bin/sh
  2. # Slackware build script for mhwaveedit
  3. # Written by Felix Krueger
  4. # contact: flex[dot]krueger[at]googlemail[dot]com
  5. PRGNAM=mhwaveedit
  6. VERSION=1.4.20
  7. BUILD=${BUILD:-1}
  8. TAG=${TAG:-_SBo}
  9. if [ -z "$ARCH" ]; then
  10. case "$( uname -m )" in
  11. i?86) ARCH=i486 ;;
  12. arm*) ARCH=arm ;;
  13. *) ARCH=$( uname -m ) ;;
  14. esac
  15. fi
  16. CWD=$(pwd)
  17. TMP=${TMP:-/tmp/SBo}
  18. PKG=$TMP/package-$PRGNAM
  19. OUTPUT=${OUTPUT:-/tmp}
  20. if [ "$ARCH" = "i486" ]; then
  21. SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  22. LIBDIRSUFFIX=""
  23. elif [ "$ARCH" = "i686" ]; then
  24. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  25. LIBDIRSUFFIX=""
  26. elif [ "$ARCH" = "x86_64" ]; then
  27. SLKCFLAGS="-O2 -fPIC"
  28. LIBDIRSUFFIX="64"
  29. else
  30. SLKCFLAGS="-O2"
  31. LIBDIRSUFFIX=""
  32. fi
  33. set -eu
  34. rm -rf $PKG
  35. mkdir -p $TMP $PKG $OUTPUT
  36. cd $TMP
  37. rm -rf $PRGNAM-$VERSION
  38. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  39. cd $PRGNAM-$VERSION
  40. chown -R root:root .
  41. chmod -R a-s,u+w,go+r-w .
  42. CFLAGS="$SLKCFLAGS" \
  43. ./configure \
  44. --prefix=/usr \
  45. --libdir=/usr/lib${LIBDIRSUFFIX} \
  46. --sysconfdir=/etc \
  47. --localstatedir=/var \
  48. --docdir=/usr/doc/$PRGNAM-$VERSION \
  49. --mandir=/usr/man \
  50. --with-double-samples \
  51. --without-arts \
  52. --without-esound \
  53. --build=$ARCH-slackware-linux
  54. make
  55. make install DESTDIR=$PKG
  56. find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  57. | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  58. find $PKG/usr/man -type f -exec gzip -9 {} \;
  59. mkdir -p $PKG/usr/share/applications
  60. cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
  61. mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
  62. cat $CWD/$PRGNAM.png > $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
  63. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  64. cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
  65. $PKG/usr/doc/$PRGNAM-$VERSION
  66. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  67. mkdir -p $PKG/install
  68. cat $CWD/slack-desc > $PKG/install/slack-desc
  69. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  70. cd $PKG
  71. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}