beep.SlackBuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/sh
  2. # Slackware build script for beep
  3. # Written by gnubien contact: memo gnubien at freenode.net
  4. # This submission is considered to be in the public domain
  5. # Modified by Robby Workman of the SlackBuilds.org project
  6. PRGNAM=beep
  7. VERSION=1.2.2
  8. ARCH=${ARCH:-i486}
  9. BUILD=${BUILD:-1}
  10. TAG=${TAG:-_SBo}
  11. CWD=$(pwd)
  12. TMP=${TMP:-/tmp/SBo}
  13. PKG=$TMP/package-$PRGNAM
  14. OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
  15. # See the manpage for more information on why, but you will need to install
  16. # beep with the suid bit set in order to have full functionality in all
  17. # instances. The default is NO, but it *should* be safe to change it to YES
  18. SET_SUID=NO
  19. rm -rf $PKG
  20. mkdir -p $TMP $PKG $OUTPUT
  21. cd $TMP || exit 1
  22. rm -rf $PRGNAM-$VERSION
  23. tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
  24. cd $PRGNAM-$VERSION || exit 1
  25. chown -R root:root .
  26. chmod -R u+w,go+r-w,a-s .
  27. # NO configure file for beep
  28. # We're going to install the beep executable into /bin instead of /usr/bin
  29. # This way, init scripts can use it if you happen to want to customize them
  30. # with some troubleshooting tones. Thanks to Erik van Tromp (alphageek) for
  31. # the suggestion.
  32. mkdir -p $PKG/bin $PKG/usr/man/man1 || exit 1
  33. make || exit
  34. strip --strip-unneeded beep
  35. if [ "$SET_SUID" = "YES" ]; then
  36. install -m 4755 beep $PKG/bin
  37. else
  38. install -m 0755 beep $PKG/bin
  39. fi
  40. install -m 0644 beep.1.gz $PKG/usr/man/man1
  41. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  42. cp -a CHANGELOG COPYING CREDITS INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
  43. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  44. mkdir -p $PKG/install
  45. cat $CWD/slack-desc > $PKG/install/slack-desc
  46. cd $PKG
  47. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz