Tela-icon-theme.SlackBuild 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #!/bin/bash
  2. # Slackware build script for Tela-icon-theme
  3. # Copyright 2022 Isaac Yu <isaacyu1@isaacyu1.com>
  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. cd $(dirname $0) ; CWD=$(pwd)
  23. PRGNAM="Tela-icon-theme"
  24. SRCVER=${SRCVER:-2022-02-21}
  25. VERSION=${VERSION:-2022_02_21}
  26. BUILD=${BUILD:-1}
  27. TAG=${TAG:-_SBo}
  28. PKGTYPE=${PKGTYPE:-tgz}
  29. ARCH=noarch
  30. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  31. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  32. exit 0
  33. fi
  34. TMP=${TMP:-/tmp/SBo}
  35. PKG=$TMP/package-$PRGNAM
  36. OUTPUT=${OUTPUT:-/tmp}
  37. set -e
  38. rm -rf $PKG
  39. mkdir -p $TMP $PKG $OUTPUT
  40. cd $TMP
  41. rm -rf $PRGNAM-$SRCVER
  42. tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
  43. cd $PRGNAM-$SRCVER
  44. chown -R root:root .
  45. # This slackbuild installs the standard color variant by default
  46. # Other color variants are available
  47. if [ "${BLACK:-no}" == yes ] ; then BLACK=black ; fi
  48. if [ "${BLUE:-no}" == yes ] ; then BLUE=blue ; fi
  49. if [ "${BROWN:-no}" == yes ] ; then BROWN=brown ; fi
  50. if [ "${GREEN:-no}" == yes ] ; then GREEN=green ; fi
  51. if [ "${GREY:-no}" == yes ] ; then GREY=grey ; fi
  52. if [ "${ORANGE:-no}" == yes ] ; then ORANGE=orange ; fi
  53. if [ "${PINK:-no}" == yes ] ; then PINK=pink ; fi
  54. if [ "${PURPLE:-no}" == yes ] ; then PURPLE=purple ; fi
  55. if [ "${RED:-no}" == yes ] ; then RED=red ; fi
  56. if [ "${YELLOW:-no}" == yes ] ; then YELLOW=yellow ; fi
  57. if [ "${MANJARO:-no}" == yes ] ; then MANJARO=manjaro ; fi
  58. if [ "${UBUNTU:-no}" == yes ] ; then UBUNTU=ubuntu ; fi
  59. # I cannot install all of the color variants at once. To put it in another way:
  60. # This slackbuild will not install with the following command:
  61. # ./install.sh -a -d $PKG/usr/share/icons
  62. # Instead, you will have to select additional color variants by passing variables to the script
  63. mkdir -p $PKG/usr/share/icons
  64. ./install.sh standard $BLACK $BLUE $BROWN $GREEN $GREY $ORANGE $PINK $PURPLE $RED $YELLOW \
  65. $MANJARO $UBUNTU -d $PKG/usr/share/icons
  66. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  67. cp AUTHORS COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION
  68. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  69. mkdir -p $PKG/install
  70. cat $CWD/slack-desc > $PKG/install/slack-desc
  71. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  72. cd $PKG
  73. find . -type l \
  74. -printf '( cd %h ; rm -rf %f )\n( cd %h ; ln -sf %l %f )\n' -delete | \
  75. sed 's,cd \./,cd ,' >> $PKG/install/doinst.sh
  76. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE