aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-09-05 02:24:50 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-09-07 09:08:50 +0700
commit9c81726d502e7b0c362852bf0e74763e9a8ef692 (patch)
tree56ebf013a07da176057f20876f935121c7242209 /misc
parent64e1c01e84f2107718652587ef2ae124a7871a60 (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')
-rw-r--r--misc/dbview/README2
-rw-r--r--misc/dbview/dbview.SlackBuild71
-rw-r--r--misc/dbview/dbview.info8
-rw-r--r--misc/dbview/manpage.diff81
-rw-r--r--misc/dbview/negate_exit_code.diff9
5 files changed, 133 insertions, 38 deletions
diff --git a/misc/dbview/README b/misc/dbview/README
index be91e6387594..e2fa660c4701 100644
--- a/misc/dbview/README
+++ b/misc/dbview/README
@@ -1,3 +1,5 @@
+dbview (dBase files viewer)
+
dbview is a little tool that will display dBase III files. You can
also use it to convert your old .dbf files for further use with Unix.
It should also work with dBase IV files, but this is mostly untested.
diff --git a/misc/dbview/dbview.SlackBuild b/misc/dbview/dbview.SlackBuild
index 39fb24f5932f..dd173c9bd888 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
diff --git a/misc/dbview/dbview.info b/misc/dbview/dbview.info
index 8578308c31a0..c3ff56d21453 100644
--- a/misc/dbview/dbview.info
+++ b/misc/dbview/dbview.info
@@ -1,10 +1,10 @@
PRGNAM="dbview"
VERSION="1.0.4"
-HOMEPAGE="http://www.infodrom.org/projects/dbview/"
-DOWNLOAD="http://www.infodrom.org/projects/dbview/download/dbview-1.0.4.tar.gz"
+HOMEPAGE="https://www.infodrom.org/projects/dbview/"
+DOWNLOAD="https://www.infodrom.org/projects/dbview/download/dbview-1.0.4.tar.gz"
MD5SUM="f77c9a85ca18dd1c80f72fcbc17c78ea"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Oleg O. Chukaev"
-EMAIL="oleg.chukaev@mail.ru"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/misc/dbview/manpage.diff b/misc/dbview/manpage.diff
new file mode 100644
index 000000000000..7d392cb04933
--- /dev/null
+++ b/misc/dbview/manpage.diff
@@ -0,0 +1,81 @@
+diff -Naur dbview-1.0.4/dbview.1 dbview-1.0.4.patched/dbview.1
+--- dbview-1.0.4/dbview.1 2006-11-20 10:57:12.000000000 -0500
++++ dbview-1.0.4.patched/dbview.1 2024-09-05 02:19:19.648467993 -0400
+@@ -20,7 +20,7 @@
+ .\" Software Foundation, Inc., 59 Temple Place - Suite 330,
+ .\" Boston, MA 02111, USA.
+ .\"
+-.TH DBVIEW 1 "November 20th, 2006" "Unix" "Database Management"
++.TH DBVIEW 1 "September 5, 2024" "Unix" "Database Management"
+ .SH NAME
+ dbview \- View dBase III files
+ .SH SYNOPSIS
+@@ -45,14 +45,14 @@
+ it to convert your old .dbf files for further use with Unix. It should
+ also work with dBase IV files, but this is mostly untested.
+
+-By default
++By default,
+ .B dbview
+ displays the contents of a dBase III or IV database file. This is be
+ done by displaying both the name of the field itself and its value. At
+ the end of every record a newline is appended.
+
+ .SH OPTIONS
+-If no option given
++If no options are given,
+ .B dbview
+ only displays the database in its most friendly way.
+
+@@ -95,7 +95,7 @@
+ .B "\-\-reserve, \-r"
+ Normally fieldnames are converted into a more friendly format. They
+ are stored in capital letters, but that looks like shouting. This
+-parameter supresses the conversion.
++parameter suppresses the conversion.
+
+ .TP
+ .B "\-\-trim, \-t"
+@@ -104,11 +104,11 @@
+
+ .TP
+ .B "\-\-version, \-v"
+-displays version and exits.
++displays the version and exits.
+
+ .SH NOTES
+-As dBase is DOS, umlauts are stored using a different code table
+-(namely ASCII) than most modern unices (namely ANSI). If you encounter
++As dBase is MS-DOS, umlauts are stored using a different code table
++(namely ASCII) than most modern unices (namely Unicode or ISO-8859-1). If you encounter
+ such a file, I would recommend piping the output through
+ .BR recode (1)
+ with
+@@ -130,14 +130,14 @@
+
+ These functions are provided by Valour Software as a gift.
+
+-I have modified and included this file and wrote a skeleton around
+-it. All together provides a powerful tool for dBase III and IV
++I have modified and included this file and written a skeleton around
++it. Altogether, it provides a powerful tool for dBase III and IV
+ database manipulation under Unix.
+
+ I mainly have written this program, because I've got several dbase
+ files containing important information for me. As I won't go running
+-DOS everytime I need some of the stored information, I had to find a
+-viewer that runs unter Unix, resp. Linux, but unfortunately didn't
++MS-DOS every time I need some of the stored information, I had to find a
++viewer that runs under Unix, specifically Linux, but unfortunately didn't
+ find one. So it was my turn.
+
+ This package as a whole is published under the GNU Public License,
+@@ -146,7 +146,7 @@
+ It wasn't the intention to write a freaking viewer and reinvent the
+ wheel again. Instead
+ .B dbview
+-is intend to be used in conjunction with your favourite unix text
++is intend to be used in conjunction with your favourite Unix text
+ utilities like
+ .BR cut ,
+ .B recode
diff --git a/misc/dbview/negate_exit_code.diff b/misc/dbview/negate_exit_code.diff
new file mode 100644
index 000000000000..cf600db9f466
--- /dev/null
+++ b/misc/dbview/negate_exit_code.diff
@@ -0,0 +1,9 @@
+--- dbview-1.0.4.orig/dbview.c
++++ dbview-1.0.4/dbview.c
+@@ -129,5 +129,5 @@ int main (int argc, char **argv)
+ strcpy(dbfile, argv[optind]);
+ /* if ! -f dbfile thnen -f dbfile.dbf */
+
+- exit (db3_process (dbfile, flags, delim));
++ exit (!db3_process (dbfile, flags, delim));
+ }