aboutsummaryrefslogtreecommitdiff
path: root/misc/grabc/grabc.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-08-27 21:37:33 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-08-31 07:56:39 +0700
commitef5683f37041a01496ecf9cb9b68ee3dc3bb9775 (patch)
tree37222d7664fef38a87203e52574e1d60499f5276 /misc/grabc/grabc.SlackBuild
parentb8488579f19de65355c9afdb3ef4a99458f13838 (diff)
downloadslackbuilds-ef5683f37041a01496ecf9cb9b68ee3dc3bb9775.tar.xz
misc/grabc: Updated for v1.0.2 (newer than 1.1), new maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/grabc/grabc.SlackBuild')
-rw-r--r--misc/grabc/grabc.SlackBuild74
1 files changed, 31 insertions, 43 deletions
diff --git a/misc/grabc/grabc.SlackBuild b/misc/grabc/grabc.SlackBuild
index db97b3c1e975..bffff32b9e54 100644
--- a/misc/grabc/grabc.SlackBuild
+++ b/misc/grabc/grabc.SlackBuild
@@ -2,30 +2,25 @@
# Slackware build script for grabc
-# Copyright 2016 Hunter Sezen California, 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.
+# Originally written by Hunter Sezen.
+# Modified and now maintained by B. Watson <urchlay@slackware.uk>.
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# NOTE: yes, 1.0.2 is *newer than* 1.1, see README.
+
+# 20240827 bkw:
+# - new maintainer.
+# - relicense as WTFPL.
+# - update for v1.0.2.
+# - fix typo in README and slack-desc.
+# - 1.0.2 has a man page; clean it up a bit.
+# - use github repo as HOMEPAGE since that seems to be what gets updated.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=grabc
-VERSION=${VERSION:-1.1}
+VERSION=${VERSION:-1.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +33,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -69,31 +61,27 @@ 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
+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 {} \;
-
-zcat $CWD/Makefile.diff.gz | patch -p1
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-CFLAGS="$SLKCFLAGS" make \
- X11LIB=/usr/X11R6/lib${LIBDIRSUFFIX}
+# 20240827 bkw: make the man page look more like a man page.
+patch -p1 < $CWD/manpage.diff
-make install \
- PREFIX=/usr \
- DOCDIR=/usr/doc/$PRGNAM-$VERSION \
- DESTDIR=$PKG
+mkdir -p $PKG/usr/bin $PKG/usr/man/man1
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+make DEFS="$SLKCFLAGS"
+strip $PRGNAM
+make install DESTDIR=$PKG bindir=/usr/bin mandir=/usr/man/man1
+gzip -9 $PKG/usr/man/man1/$PRGNAM.1
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README.md $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc