summaryrefslogtreecommitdiff
path: root/development/highlight/highlight.SlackBuild
diff options
context:
space:
mode:
authorErik Hanson <erik@slackbuilds.org>2011-12-10 16:27:36 -0200
committerNiels Horn <niels.horn@slackbuilds.org>2011-12-10 16:27:36 -0200
commitd32a12b3d03e88cf60733aaf3e3d4ca77d79ce28 (patch)
tree77a7e7283af256e4b54fccdabf35426464714dda /development/highlight/highlight.SlackBuild
parentba539b5717e103bd8176675fdd402c067872089c (diff)
downloadslackbuilds-d32a12b3d03e88cf60733aaf3e3d4ca77d79ce28.tar.gz
development/highlight: Added (a universal syntax highlighter)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'development/highlight/highlight.SlackBuild')
-rw-r--r--development/highlight/highlight.SlackBuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/development/highlight/highlight.SlackBuild b/development/highlight/highlight.SlackBuild
new file mode 100644
index 0000000000..cd1e310b78
--- /dev/null
+++ b/development/highlight/highlight.SlackBuild
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# Slackware build script for highlight
+#
+# Copyright 2011 Erik W. Hanson, Minneapolis, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=highlight
+VERSION=3.6
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+set -ue
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+make cli
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/man $PKG/usr/man
+
+mv $PKG/etc/$PRGNAM/filetypes.conf{,.new}
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/highlight/* $PKG/usr/doc/$PRGNAM-$VERSION
+rmdir $PKG/usr/share/doc/highlight $PKG/usr/share/doc
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}