Advertisement
Guest User

color-theme slackbuild augmented for nondistribution emacs

a guest
May 30th, 2012
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.49 KB | None | 0 0
  1. #!/bin/sh
  2. # Slackware build script for color-theme 6.6.0
  3. # Written by Asaf Ohaion <asaf at hadasa-oss net>
  4.  
  5. #
  6. ## Copyright  2010  Asaf Ohaion, <asaf at hadasa-oss net>
  7. # All rights reserved.
  8. #
  9. # Redistribution and use of this script, with or without modification, is
  10. # permitted provided that the following conditions are met:
  11. #
  12. # 1. Redistributions of this script must retain the above copyright
  13. #    notice, this list of conditions and the following disclaimer.
  14. #
  15. #  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  16. #  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  17. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  18. #  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  19. #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  20. #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  21. #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  22. #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  23. #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  24. #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25.  
  26.  
  27. PRGNAM=color-theme
  28. VERSION=${VERSION:-6.6.0}
  29. BUILD=${BUILD:-1}
  30. TAG=${TAG:-_SBo}
  31.  
  32. if [ -z "$ARCH" ]; then
  33.   case "$( uname -m )" in
  34.     i?86) ARCH=i486 ;;
  35.     arm*) ARCH=arm ;;
  36.        *) ARCH=$( uname -m ) ;;
  37.   esac
  38. fi
  39.  
  40. CWD=$(pwd)
  41. TMP=${TMP:-/tmp/SBo}
  42. PKG=$TMP/package-$PRGNAM
  43. OUTPUT=${OUTPUT:-/tmp}
  44. set -e
  45.  
  46. rm -rf $PKG
  47. mkdir -p $TMP $PKG $OUTPUT
  48. cd $TMP
  49. rm -rf $PRGNAM-$VERSION
  50. tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
  51. cd $PRGNAM-$VERSION
  52. chown -R root:root .
  53. find . \
  54.  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
  55.  -exec chmod 755 {} \; -o \
  56.  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  57.  -exec chmod 644 {} \;
  58.  
  59. # Fix location of info files
  60. sed "s|share/info|info|g" -i Makefile
  61.  
  62. patch -p1 < $CWD/fix_makefile.diff
  63. # make
  64. # THIS IS WHAT WAS CHANGED
  65. make install PREFIX=/usr/local DESTDIR=$PKG
  66.  
  67. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  68. cp -a \
  69.   COPYING AUTHORS BUGS HACKING README ChangeLog \
  70.   $PKG/usr/doc/$PRGNAM-$VERSION
  71. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  72.  
  73. mkdir -p $PKG/install
  74. cat $CWD/slack-desc > $PKG/install/slack-desc
  75.  
  76. # remove unused /etc/emacs
  77. rm -rf $PKG/etc/emacs
  78.  
  79. cd $PKG
  80. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement