kde44-oxygen-molecule.SlackBuild 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #!/bin/bash
  2. # Slackware build script for kde44-oxygen-molecule
  3. # Written by Christopher Reimer (reimer.christopher@freenet.de)
  4. # Redistribution and use of this script, with or without modification, is
  5. # permitted provided that the following conditions are met:
  6. #
  7. # 1. Redistributions of this script must retain the above copyright
  8. # notice, this list of conditions and the following disclaimer.
  9. #
  10. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  11. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  13. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  14. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  15. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  16. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  17. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  18. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  19. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  20. cd $(dirname $0) ; CWD=$(pwd)
  21. PRGNAM=kde44-oxygen-molecule
  22. VERSION=${VERSION:-3.2}
  23. BUILD=${BUILD:-1}
  24. TAG=${TAG:-_SBo}
  25. PKGTYPE=${PKGTYPE:-tgz}
  26. SRCPKG=103741-Oxygen-Molecule_"$VERSION"_theme
  27. ARCH=noarch
  28. # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
  29. # the name of the created package would be, and then exit. This information
  30. # could be useful to other scripts.
  31. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  32. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  33. exit 0
  34. fi
  35. TMP=${TMP:-/tmp/SBo}
  36. PKG=$TMP/package-$PRGNAM
  37. OUTPUT=${OUTPUT:-/tmp}
  38. set -e
  39. rm -rf $PKG
  40. mkdir -p $TMP $PKG $OUTPUT
  41. cd $TMP
  42. rm -rf $PRGNAM
  43. mkdir $PRGNAM
  44. cd $PRGNAM
  45. tar -xvf $CWD/$SRCPKG.tar.gz
  46. chown -R root:root .
  47. find -L . \
  48. \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  49. -exec chmod 755 {} \; -o \
  50. \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  51. -exec chmod 644 {} \;
  52. # GTK-Theme
  53. mkdir -p $PKG/usr/share/themes
  54. tar xvf $PRGNAM.tar.gz -C $PKG/usr/share/themes
  55. chown -R root:root $PKG/usr/share/themes
  56. # Mini-Script
  57. mkdir -p $PKG/usr/bin
  58. cp -a flatmolecule $PKG/usr/bin
  59. # KDE-Color-File
  60. mkdir -p $PKG/usr/share/apps/color-schemes
  61. cp -a Oxygen-Molecule_3.0.colors $PKG/usr/share/apps/color-schemes/
  62. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  63. cp -a COPYING *.pdf *.odt $PKG/usr/doc/$PRGNAM-$VERSION
  64. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  65. cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
  66. mkdir -p $PKG/install
  67. cat $CWD/slack-desc > $PKG/install/slack-desc
  68. cd $PKG
  69. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE