#!/bin/bash # Slackware build script for colordiff # Originally by Grigorios Bouzakis # Previously maintained by Ryan P.C. McQuen, WA, # then maintained by Ricardo J. Barberis. # Now maintained by B. Watson (urchlay@slackware.uk). # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version, with the following exception: # the text of the GPL license may be omitted.. # This program is distributed in the hope that it will be useful, but # without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. Compiling, # interpreting, executing or merely reading the text of the program # may result in lapses of consciousness and/or very being, up to and # including the end of all existence and the Universe as we know it. # See the GNU General Public License for more details. # You may have received a copy of the GNU General Public License # along with this program (most likely, a file named COPYING). If # not, see . # 20230804 bkw: # - take over maintenance. # - update for v1.0.21. # 20220404 bkw: Modified by SlackBuilds.org, BUILD=2: # - fix download URL. # - get rid of useless INSTALL in doc dir. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=colordiff VERSION=${VERSION:-1.0.21} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} 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} 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 /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + mkdir -p $PKG/etc $PKG/usr/bin $PKG/usr/man/man1 install -m 644 colordiffrc $PKG/etc/colordiffrc.new install -m 755 colordiff.pl $PKG/usr/bin/colordiff install -m 755 cdiff.sh $PKG/usr/bin/cdiff gzip -9c colordiff.1 > $PKG/usr/man/man1/colordiff.1.gz gzip -9c cdiff.1 > $PKG/usr/man/man1/cdiff.1.gz mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a BUGS CHANGES COPYING README $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 cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE