diff options
author | B. Watson <urchlay@slackware.uk> | 2024-09-05 02:24:50 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-09-07 09:08:50 +0700 |
commit | 9c81726d502e7b0c362852bf0e74763e9a8ef692 (patch) | |
tree | 56ebf013a07da176057f20876f935121c7242209 /misc/dbview/dbview.SlackBuild | |
parent | 64e1c01e84f2107718652587ef2ae124a7871a60 (diff) |
misc/dbview: New maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/dbview/dbview.SlackBuild')
-rw-r--r-- | misc/dbview/dbview.SlackBuild | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/misc/dbview/dbview.SlackBuild b/misc/dbview/dbview.SlackBuild index 39fb24f593..dd173c9bd8 100644 --- a/misc/dbview/dbview.SlackBuild +++ b/misc/dbview/dbview.SlackBuild @@ -1,13 +1,29 @@ #!/bin/bash # Slackware build script for dbview -# Written by Oleg O. Chukaev <oleg.chukaev@mail.ru> +# Written by Oleg O. Chukaev +# Modified and now maintained by B. Watson <urchlay@slackware.uk> + +# Original version of this script had no license; modified version +# licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# 20240905 bkw: BUILD=2 +# - new maintainer. +# - actually test against some .dbf files, found here: +# https://github.com/infused/dbf/tree/master/spec/fixtures +# not all of them are in supported versions of the .dbf format, +# but at least some of them work fine. +# - add a patch from Debian. +# - add a patch to fix grammar/spelling/usage in the man page. +# - get rid of unneeded makefile.diff. + +# Note: this is more for digital archaeology than anything else. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=dbview VERSION=${VERSION:-1.0.4} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -19,9 +35,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 @@ -33,16 +46,12 @@ 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 @@ -54,31 +63,25 @@ 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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# Fix paths and owners/groups -patch -i $CWD/Makefile.diff - -make CFLAGS="$SLKCFLAGS -fomit-frame-pointer -Wall -pipe" -make install DESTDIR=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - CHANGES README dBASE \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# 20240905 bkw: patch borrowed from Debian: the exit status is +# backwards (should be 0 for success, not 1). +patch -p1 < $CWD/negate_exit_code.diff + +# 20240905 bkw: my own patch for the man page. some of the changes +# are nitpicky (DOS => MS-DOS), but matter to me. +patch -p1 < $CWD/manpage.diff + +make CFLAGS="$SLKCFLAGS -Wl,-s" +make install prefix=$PKG/usr mandir=$PKG/usr/man MAN=root +gzip -9 $PKG/usr/man/man*/* + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a CHANGES README dBASE $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |