multimidicast.SlackBuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/bash
  2. # Slackware build script for <multimidicast>
  3. # Michales - clavisound - Michaloudes korgie@gmail.com <2011>
  4. # 20220218 bkw: Modified by SlackBuilds.org:
  5. # - updated for v1.4.
  6. # - seems to build & run OK on x86_64, so remove UNTESTED from .info.
  7. cd $(dirname $0) ; CWD=$(pwd)
  8. PRGNAM=multimidicast
  9. VERSION=${VERSION:-1.4}
  10. BUILD=${BUILD:-1}
  11. TAG=${TAG:-_SBo}
  12. PKGTYPE=${PKGTYPE:-tgz}
  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 $PRGNAM-$VERSION
  45. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  46. cd $PRGNAM-$VERSION
  47. chown -R root:root .
  48. find -L . \
  49. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  50. -exec chmod 755 {} \+ -o \
  51. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  52. -exec chmod 644 {} \+
  53. make CXXFLAGS="$SLKCFLAGS -Wall"
  54. mkdir -p $PKG/usr/bin
  55. install -m0755 -s $PRGNAM $PKG/usr/bin/
  56. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  57. cp -a AUTHORS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
  58. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  59. mkdir -p $PKG/install
  60. cat $CWD/slack-desc > $PKG/install/slack-desc
  61. cd $PKG
  62. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE