alsa-plugin-jack.SlackBuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #!/bin/bash
  2. # Slackware build script for alsa-plugin-jack
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20210803 bkw: updated for v1.2.5 and -current. This should be kept
  6. # in sync with slackware-current's alsa-plugins version. Hopefully
  7. # 15.0 is releasing Real Soon so I don't have to keep updating this.
  8. cd $(dirname $0) ; CWD=$(pwd)
  9. PRGNAM=alsa-plugin-jack
  10. VERSION=${VERSION:-1.2.5}
  11. BUILD=${BUILD:-1}
  12. TAG=${TAG:-_SBo}
  13. PKGTYPE=${PKGTYPE:-tgz}
  14. if [ -z "$ARCH" ]; then
  15. case "$( uname -m )" in
  16. i?86) ARCH=i586 ;;
  17. arm*) ARCH=arm ;;
  18. *) ARCH=$( uname -m ) ;;
  19. esac
  20. fi
  21. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  22. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  23. exit 0
  24. fi
  25. TMP=${TMP:-/tmp/SBo}
  26. PKG=$TMP/package-$PRGNAM
  27. OUTPUT=${OUTPUT:-/tmp}
  28. if [ "$ARCH" = "i586" ]; then
  29. SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  30. LIBDIRSUFFIX=""
  31. elif [ "$ARCH" = "i686" ]; then
  32. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  33. LIBDIRSUFFIX=""
  34. elif [ "$ARCH" = "x86_64" ]; then
  35. SLKCFLAGS="-O2 -fPIC"
  36. LIBDIRSUFFIX="64"
  37. else
  38. SLKCFLAGS="-O2"
  39. LIBDIRSUFFIX=""
  40. fi
  41. set -e
  42. SRCNAM=alsa-plugins
  43. rm -rf $PKG
  44. mkdir -p $TMP $PKG $OUTPUT
  45. cd $TMP
  46. rm -rf $SRCNAM-$VERSION
  47. tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
  48. cd $SRCNAM-$VERSION
  49. chown -R root:root .
  50. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  51. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  52. CFLAGS="$SLKCFLAGS" \
  53. CXXFLAGS="$SLKCFLAGS" \
  54. ./configure \
  55. --prefix=/usr \
  56. --libdir=/usr/lib${LIBDIRSUFFIX} \
  57. --sysconfdir=/etc \
  58. --localstatedir=/var \
  59. --mandir=/usr/man \
  60. --docdir=/usr/doc/$PRGNAM-$VERSION \
  61. --build=$ARCH-slackware-linux
  62. make -C jack
  63. make -C jack install-strip DESTDIR=$PKG
  64. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  65. cp -a doc/README-jack $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. cd $PKG
  70. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE