Window_Manager_Scripts.SlackBuild 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/sh
  2. # Slackware build script for Window-Manager-Scripts
  3. #
  4. # Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
  5. # All rights reserved.
  6. #
  7. # Based on:
  8. # SBo's cmake-template
  9. #
  10. # Redistribution and use of this script, with or without modification, is
  11. # permitted provided that the following conditions are met:
  12. #
  13. # 1. Redistributions of this script must retain the above copyright
  14. # notice, this list of conditions and the following disclaimer.
  15. #
  16. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  19. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. PRGNAM=Window_Manager_Scripts
  27. RPRGNAM=Window-Manager-Scripts # Real Program Name
  28. VERSION=${VERSION:-e8d3685da9e07a97823047a3c3685b298b968ec2}
  29. BUILD=${BUILD:-1}
  30. TAG=${TAG:-_SBo}
  31. CWD=$(pwd)
  32. TMP=${TMP:-/tmp/SBo}
  33. PKG=$TMP/package-$PRGNAM
  34. OUTPUT=${OUTPUT:-/tmp}
  35. set -e
  36. rm -rf $PKG
  37. mkdir -p $TMP $PKG $OUTPUT
  38. cd $TMP
  39. rm -rf $RPRGNAM-$VERSION
  40. unzip $CWD/$RPRGNAM-$VERSION.zip || unzip $CWD/$VERSION.zip
  41. cd $RPRGNAM-$VERSION
  42. chown -R root:root .
  43. find -L . \
  44. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  45. -o -perm 511 \) -exec chmod 755 {} \; -o \
  46. \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  47. -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
  48. # Copy over shell scripts to bin
  49. mkdir -p $PKG/usr/bin
  50. cp -a batterylow importadvanced timer-xy videobackground $PKG/usr/bin/
  51. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  52. cp -a LICENSE README.Credits README.md .xyscripts $PKG/usr/doc/$PRGNAM-$VERSION
  53. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  54. mkdir -p $PKG/install
  55. cat $CWD/slack-desc > $PKG/install/slack-desc
  56. cd $PKG
  57. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-noarch-$BUILD$TAG.${PKGTYPE:-tgz}