xpenguins-xtrathemes.SlackBuild 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/bin/bash
  2. # Slackware build script for xpenguins-xtrathemes
  3. # Copyright <2018> <Michael Heras> <USA>
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. # notice, this list of conditions and the following disclaimer.
  11. #
  12. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  13. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  15. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  19. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  20. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  21. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22. # Modified by SlackBuilds.org:
  23. # 20220207 bkw: BUILD=2
  24. # - force ARCH=noarch.
  25. # - add missing 'about' files (xpenguins segfaults without them).
  26. # - add a couple of missing icons, resize a couple that were too big.
  27. # - vastly simplify the script.
  28. cd $(dirname $0) ; CWD=$(pwd)
  29. PRGNAM=xpenguins-xtrathemes
  30. VERSION=${VERSION:-1.0}
  31. BUILD=${BUILD:-2}
  32. TAG=${TAG:-_SBo}
  33. PKGTYPE=${PKGTYPE:-tgz}
  34. ARCH=noarch
  35. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  36. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  37. exit 0
  38. fi
  39. TMP=${TMP:-/tmp/SBo}
  40. PKG=$TMP/package-$PRGNAM
  41. OUTPUT=${OUTPUT:-/tmp}
  42. set -e
  43. rm -rf $PKG
  44. mkdir -p $TMP $PKG $OUTPUT
  45. cd $TMP
  46. rm -rf $PRGNAM-$VERSION
  47. mkdir -p $PRGNAM-$VERSION
  48. cd $PRGNAM-$VERSION
  49. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  50. find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
  51. \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
  52. chown -R root:root .
  53. # 20220207 bkw: someone left a backup file in the tarball:
  54. rm -f themes/*/*~
  55. # 20220207 bkw: these icons are just too big, they break the xpenguins UI.
  56. for i in themes/Winnie_the_Pooh/pooh_sitter.png themes/Walking_Man/walkingman.png; do
  57. convert -resize 32x32 $i 1.png
  58. mv 1.png $i
  59. done
  60. SHAREDIR=$PKG/usr/share/xpenguins/
  61. mkdir -p $SHAREDIR
  62. cp -r themes $SHAREDIR
  63. # 20220207 bkw: xpenguins will segfault if a theme has no about file.
  64. # Went ahead and made icons, too.
  65. for i in XSheep M.U.L.E.; do
  66. install -oroot -groot -m0644 $CWD/$i.about $SHAREDIR/themes/$i/about
  67. install -oroot -groot -m0644 $CWD/$i.png $SHAREDIR/themes/$i/$i.png
  68. done
  69. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  70. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  71. mkdir -p $PKG/install
  72. cat $CWD/slack-desc > $PKG/install/slack-desc
  73. cd $PKG
  74. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE