vcf_plugins.SlackBuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #!/bin/bash
  2. # Slackware build script for vcf_plugins
  3. # Written by B. Watson (yalhcru@gmail.com)
  4. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  5. # 20211203 bkw: BUILD=2, reformat slack-desc.
  6. cd $(dirname $0) ; CWD=$(pwd)
  7. PRGNAM=vcf_plugins
  8. VERSION=${VERSION:-0.0.5}
  9. BUILD=${BUILD:-2}
  10. TAG=${TAG:-_SBo}
  11. PKGTYPE=${PKGTYPE:-tgz}
  12. SRCNAM=vcf
  13. if [ -z "$ARCH" ]; then
  14. case "$( uname -m )" in
  15. i?86) ARCH=i586 ;;
  16. arm*) ARCH=arm ;;
  17. *) ARCH=$( uname -m ) ;;
  18. esac
  19. fi
  20. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  21. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  22. exit 0
  23. fi
  24. TMP=${TMP:-/tmp/SBo}
  25. PKG=$TMP/package-$PRGNAM
  26. OUTPUT=${OUTPUT:-/tmp}
  27. if [ "$ARCH" = "i586" ]; then
  28. SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  29. LIBDIRSUFFIX=""
  30. elif [ "$ARCH" = "i686" ]; then
  31. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  32. LIBDIRSUFFIX=""
  33. elif [ "$ARCH" = "x86_64" ]; then
  34. SLKCFLAGS="-O2 -fPIC"
  35. LIBDIRSUFFIX="64"
  36. else
  37. SLKCFLAGS="-O2"
  38. LIBDIRSUFFIX=""
  39. fi
  40. set -e
  41. rm -rf $PKG
  42. mkdir -p $TMP $PKG $OUTPUT
  43. cd $TMP
  44. rm -rf $SRCNAM-$VERSION
  45. tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
  46. cd $SRCNAM-$VERSION
  47. chown -R root:root .
  48. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  49. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  50. sed -i 's/cc -c/gcc -c $(CFLAGS)/' Makefile
  51. make CFLAGS="$SLKCFLAGS"
  52. mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/ladspa
  53. install -oroot -groot -s -m0755 ${SRCNAM}.so ${SRCNAM}_cv_in.so \
  54. $PKG/usr/lib$LIBDIRSUFFIX/ladspa/
  55. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  56. cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
  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. cd $PKG
  61. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE