lv2dynparam1.SlackBuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/bin/bash
  2. # Slackware build script for lv2dynparam1
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20211128 bkw: BUILD=2
  6. # - fix grammar in README, slack-desc (still a run-on sentence).
  7. # - banish .la files.
  8. cd $(dirname $0) ; CWD=$(pwd)
  9. PRGNAM=lv2dynparam1
  10. VERSION=${VERSION:-2}
  11. BUILD=${BUILD:-2}
  12. TAG=${TAG:-_SBo}
  13. PKGTYPE=${PKGTYPE:-tgz}
  14. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  15. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  16. exit 0
  17. fi
  18. TMP=${TMP:-/tmp/SBo}
  19. PKG=$TMP/package-$PRGNAM
  20. OUTPUT=${OUTPUT:-/tmp}
  21. if [ -z "$ARCH" ]; then
  22. case "$( uname -m )" in
  23. i?86) ARCH=i586 ;;
  24. arm*) ARCH=arm ;;
  25. *) ARCH=$( uname -m ) ;;
  26. esac
  27. fi
  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. rm -rf $PKG
  43. mkdir -p $TMP $PKG $OUTPUT
  44. cd $TMP
  45. rm -rf $PRGNAM-$VERSION
  46. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  47. cd $PRGNAM-$VERSION
  48. chown -R root:root .
  49. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  50. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  51. # In the newer lv2 the pkgconfig file is named differently...
  52. sed -i "s|lv2core|lv2|" configure
  53. CFLAGS="$SLKCFLAGS" \
  54. CXXFLAGS="$SLKCFLAGS" \
  55. ./configure \
  56. --prefix=/usr \
  57. --libdir=/usr/lib${LIBDIRSUFFIX} \
  58. --sysconfdir=/etc \
  59. --localstatedir=/var \
  60. --mandir=/usr/man \
  61. --docdir=/usr/doc/$PRGNAM-$VERSION \
  62. --build=$ARCH-slackware-linux
  63. make
  64. make install-strip DESTDIR=$PKG
  65. # configure ignores --disable-static, also ditch .la files
  66. rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.{a,la}
  67. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  68. cp -a AUTHORS COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
  69. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  70. mkdir -p $PKG/install
  71. cat $CWD/slack-desc > $PKG/install/slack-desc
  72. cd $PKG
  73. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE