summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Dan-Simon Myrland <dansimon@radiotube.org>2025-06-12 09:11:33 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2025-06-12 09:31:09 +0700
commit71221a310840646a3d5a63ce5c7d356ade473748 (patch)
tree0e483d9b588ee9de5711e62159b6caac43d8c361
parent84c7d44cc2a1fbdf0b87a82cdf2ace45755ebfa4 (diff)
downloadslackbuilds-71221a310840646a3d5a63ce5c7d356ade473748.tar.gz
slackbuilds-71221a310840646a3d5a63ce5c7d356ade473748.tar.xz
system/supercat: Added (Alternative to bat).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/supercat/README7
-rw-r--r--system/supercat/slack-desc19
-rw-r--r--system/supercat/supercat.SlackBuild86
-rw-r--r--system/supercat/supercat.info10
4 files changed, 122 insertions, 0 deletions
diff --git a/system/supercat/README b/system/supercat/README
new file mode 100644
index 0000000000..c58148278b
--- /dev/null
+++ b/system/supercat/README
@@ -0,0 +1,7 @@
+Supercat prints text files in a colorized manner based on regular
+expression rules. By default it suports a handful of known filetypes,
+such as C and Python source, ChangeLogs, diffs, etc. The real beauty
+of this simple program though is that you can easily write your own
+highlighting files with a little regex know-how.
+
+PS: The default highlighting files are located in /etc/supercat.
diff --git a/system/supercat/slack-desc b/system/supercat/slack-desc
new file mode 100644
index 0000000000..42553ebaa6
--- /dev/null
+++ b/system/supercat/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------------------------------------------------------|
+supercat: supercat (colorize text files)
+supercat:
+supercat: Supercat prints text files in a colorized manner based on regular
+supercat: expression rules. By default it suports a handful of known filetypes,
+supercat: such as C and Python source, ChangeLogs, diffs, etc. The real beauty
+supercat: of this simple program though is that you can easily write your own
+supercat: highlighting files with a little regex know-how.
+supercat:
+supercat:
+supercat:
+supercat:
diff --git a/system/supercat/supercat.SlackBuild b/system/supercat/supercat.SlackBuild
new file mode 100644
index 0000000000..3a94bdb56c
--- /dev/null
+++ b/system/supercat/supercat.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/bash
+# Slackware build script for supercat
+# Written by Dan-Simon Myrland <dansimon@radiotube.org>
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=supercat
+VERSION=${VERSION:-0.5.8}
+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"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux
+
+make
+make install-strip DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
+m $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/supercat/supercat.info b/system/supercat/supercat.info
new file mode 100644
index 0000000000..337747080c
--- /dev/null
+++ b/system/supercat/supercat.info
@@ -0,0 +1,10 @@
+PRGNAM="supercat"
+VERSION="0.5.8"
+HOMEPAGE="http://supercat.nosredna.net"
+DOWNLOAD="http://supercat.nosredna.net/supercat-0.5.8.tar.gz"
+MD5SUM="df6eb3aeb960606282358ed31a88b699"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Dan-Simon Myrland"
+EMAIL="dansimon@radiotube.org"