summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/grc/README14
-rw-r--r--misc/grc/grc.SlackBuild95
-rw-r--r--misc/grc/grc.bashrc-expanded35
-rw-r--r--misc/grc/grc.info10
-rw-r--r--misc/grc/grc.zsh40
-rw-r--r--misc/grc/slack-desc19
6 files changed, 213 insertions, 0 deletions
diff --git a/misc/grc/README b/misc/grc/README
new file mode 100644
index 0000000000..4a0ed4ba0e
--- /dev/null
+++ b/misc/grc/README
@@ -0,0 +1,14 @@
+grc (generic colouriser)
+
+grc provides two programs: grc and grcat. The main is grcat, which
+acts as a filter, i.e. taking standard input, colourising it and
+writing to standard output. grcat takes as a parameter the name of
+configuration file.
+
+To use, add following lines into your ~/.bashrc or ~/.zshrc:
+
+ [[ -s "/etc/grc.bashrc" ]] && source /etc/grc.bashrc
+ [[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
+
+Or put the entire content of /usr/doc/grc-1.9/grc.bashrc-expanded
+example into these files.
diff --git a/misc/grc/grc.SlackBuild b/misc/grc/grc.SlackBuild
new file mode 100644
index 0000000000..5ccb538329
--- /dev/null
+++ b/misc/grc/grc.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+#
+# Slackware build script for grc.
+#
+# Copyright 2015 Edinaldo P. Silva, Rio de Janeiro, Brazil.
+# 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="grc"
+VERSION=${VERSION:-1.9}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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
+
+SRCVER="v1.9"
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$SRCVER.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+
+install -d $PKG/etc
+install -D -m644 {grc.conf,grc.bashrc,$CWD/grc.zsh} $PKG/etc
+
+install -d $PKG/usr/bin
+install -D -m755 {grc,grcat} $PKG/usr/bin/
+
+install -d $PKG/usr/man/man1
+install -D -m644 {grc.1,grcat.1} $PKG/usr/man/man1
+
+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 ; rm $i ; done
+
+install -d $PKG/usr/share/$PRGNAM
+install -D -m644 conf.* $PKG/usr/share/$PRGNAM
+
+DOCS="$CWD/grc.bashrc-expanded contrib debian/changelog debian/copyright \
+CREDITS INSTALL README Regexp.txt TODO"
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $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:-tgz}
diff --git a/misc/grc/grc.bashrc-expanded b/misc/grc/grc.bashrc-expanded
new file mode 100644
index 0000000000..e15fd64764
--- /dev/null
+++ b/misc/grc/grc.bashrc-expanded
@@ -0,0 +1,35 @@
+GRC=`which grc`
+if [ "$TERM" != dumb ] && [ -n "$GRC" ]
+then
+ alias colourify="$GRC -es --colour=auto"
+ alias cfg='colourify ./configure'
+ alias configure='colourify ./configure'
+ alias as='colourify as'
+ alias cvs='colourify cvs'
+ alias df='colourify df'
+ alias diff='colourify diff'
+ alias dig='colourify dig'
+ alias g++='colourify g++'
+ alias gas='colourify gas'
+ alias gcc='colourify gcc'
+ alias esperanto='colourify esperanto'
+ alias head='colourify head'
+ alias ifconfig='colourify ifconfig'
+ alias irclog='colourify irclog'
+ alias ld='colourify ld'
+ alias ldap='colourify ldap'
+ alias log='colourify log'
+ alias ls='colourify ls'
+ alias make='colourify make'
+ alias mount='colourify mount'
+ alias mount2='colourify mount2'
+ alias mtr='colourify mtr'
+ alias netstat='colourify netstat'
+ alias ping='colourify ping'
+ alias php='colourify php'
+ alias proftpd='colourify proftpd'
+ alias ps='colourify ps'
+ alias tail='colourify tail'
+ alias traceroute='colourify /usr/sbin/traceroute'
+ alias wdiff='colourify wdiff'
+fi
diff --git a/misc/grc/grc.info b/misc/grc/grc.info
new file mode 100644
index 0000000000..4d4f9c0e54
--- /dev/null
+++ b/misc/grc/grc.info
@@ -0,0 +1,10 @@
+PRGNAM="grc"
+VERSION="1.9"
+HOMEPAGE="https://github.com/garabik/grc"
+DOWNLOAD="https://github.com/garabik/grc/archive/v1.9.tar.gz"
+MD5SUM="2d2d2d4fb465e7f1974b5fecb6903206"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Edinaldo P. Silva"
+EMAIL="edps.mundognu@gmail.com"
diff --git a/misc/grc/grc.zsh b/misc/grc/grc.zsh
new file mode 100644
index 0000000000..f02db3ab83
--- /dev/null
+++ b/misc/grc/grc.zsh
@@ -0,0 +1,40 @@
+if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then
+ # Prevent grc aliases from overriding zsh completions.
+ setopt COMPLETE_ALIASES
+
+ # Supported commands
+ cmds=(
+ cc \
+ configure \
+ cvs \
+ df \
+ diff \
+ dig \
+ gcc \
+ gmake \
+ ifconfig \
+ last \
+ ldap \
+ ls \
+ make \
+ mount \
+ mtr \
+ netstat \
+ ping \
+ ping6 \
+ ps \
+ traceroute \
+ traceroute6 \
+ wdiff \
+ );
+
+ # Set alias for available commands.
+ for cmd in $cmds ; do
+ if (( $+commands[$cmd] )) ; then
+ alias $cmd="grc --colour=auto $cmd"
+ fi
+ done
+
+ # Clean up variables
+ unset cmds cmd
+fi
diff --git a/misc/grc/slack-desc b/misc/grc/slack-desc
new file mode 100644
index 0000000000..d770dd2c0b
--- /dev/null
+++ b/misc/grc/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------------------------------------------------------|
+grc: grc (generic colouriser)
+grc:
+grc: grc provides two programs: grc and grcat. The main is grcat, which
+grc: acts as a filter, i.e. taking standard input, colourising it and
+grc: writing to standard output. grcat takes as a parameter the name of
+grc: configuration file.
+grc:
+grc: https://github.com/garabik/grc
+grc:
+grc:
+grc: