summaryrefslogtreecommitdiffstats
path: root/system/ansifilter
diff options
context:
space:
mode:
Diffstat (limited to 'system/ansifilter')
-rw-r--r--system/ansifilter/README5
-rw-r--r--system/ansifilter/ansifilter.SlackBuild87
-rw-r--r--system/ansifilter/ansifilter.info10
-rw-r--r--system/ansifilter/doinst.sh9
-rw-r--r--system/ansifilter/slack-desc19
5 files changed, 130 insertions, 0 deletions
diff --git a/system/ansifilter/README b/system/ansifilter/README
new file mode 100644
index 0000000000..9588f983a3
--- /dev/null
+++ b/system/ansifilter/README
@@ -0,0 +1,5 @@
+ansifilter (strip or convert ANSI escapes in text files)
+
+Ansifilter handles text files containing ANSI terminal escape codes.
+The command sequences may be stripped or be interpreted to generate
+formatted output (HTML, RTF, TeX, LaTeX, BBCode, Pango).
diff --git a/system/ansifilter/ansifilter.SlackBuild b/system/ansifilter/ansifilter.SlackBuild
new file mode 100644
index 0000000000..2a5461d435
--- /dev/null
+++ b/system/ansifilter/ansifilter.SlackBuild
@@ -0,0 +1,87 @@
+#!/bin/bash
+
+# Slackware build script for ansifilter
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=ansifilter
+VERSION=${VERSION:-2.20}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+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 .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+
+# don't need this in the doc dir.
+sed -i '/\.\/INSTALL/d' makefile
+
+# use our flags, followed by upstream's (which are already -O2 -fPIC,
+# so this really only matters on x86 32-bit). don't have to mess with
+# the qt stuff, qmake already uses the correct flags it was built with.
+sed -i "/FLAGS/s,-Wall,$SLKCFLAGS," src/makefile
+
+make
+make gui
+# make tcl ### tcl support disabled unless someone requests it someday.
+make install \
+ man_dir=/usr/man/man1 doc_dir=/usr/doc/$PRGNAM-$VERSION \
+ DESTDIR=$PKG INSTALL_PROGRAM="install -s -m0755"
+make install-gui \
+ DESTDIR=$PKG INSTALL_PROGRAM="install -s -m0755"
+gzip -9 $PKG/usr/man/man*/*
+
+ICONS=$PKG/usr/share/icons/hicolor/48x48/apps
+mkdir -p $ICONS
+convert src/qt-gui/ansifilter.xpm $ICONS/$PRGNAM.png
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ansi_art_samples $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
diff --git a/system/ansifilter/ansifilter.info b/system/ansifilter/ansifilter.info
new file mode 100644
index 0000000000..54475ed2a8
--- /dev/null
+++ b/system/ansifilter/ansifilter.info
@@ -0,0 +1,10 @@
+PRGNAM="ansifilter"
+VERSION="2.20"
+HOMEPAGE="http://andre-simon.de/doku/ansifilter/en/ansifilter.php"
+DOWNLOAD="http://andre-simon.de/zip/ansifilter-2.20.tar.bz2"
+MD5SUM="d2a8d8b9256bc8c843934d8123b5c0dd"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/system/ansifilter/doinst.sh b/system/ansifilter/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/system/ansifilter/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/system/ansifilter/slack-desc b/system/ansifilter/slack-desc
new file mode 100644
index 0000000000..c292c56293
--- /dev/null
+++ b/system/ansifilter/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ansifilter: ansifilter (strip or convert ANSI escapes in text files)
+ansifilter:
+ansifilter: Ansifilter handles text files containing ANSI terminal escape codes.
+ansifilter: The command sequences may be stripped or be interpreted to generate
+ansifilter: formatted output (HTML, RTF, TeX, LaTeX, BBCode, Pango).
+ansifilter:
+ansifilter:
+ansifilter:
+ansifilter:
+ansifilter:
+ansifilter: