aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-04 19:08:05 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-04 19:08:05 -0400
commit42cca93c7fb896f56ed44c4b0310f643e57aeb77 (patch)
treede36eed19092848eaabe5dfe10497c4bddf2a94d /misc
parent96abaec1e67f621e8471bb6afea27009ebcc4fa2 (diff)
misc/bsdsfv: COLOR=yes by default, fix docs.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/bsdsfv/README9
-rw-r--r--misc/bsdsfv/bsdsfv.SlackBuild36
2 files changed, 24 insertions, 21 deletions
diff --git a/misc/bsdsfv/README b/misc/bsdsfv/README
index 81d988f3f5039..b700f72ed6020 100644
--- a/misc/bsdsfv/README
+++ b/misc/bsdsfv/README
@@ -5,5 +5,10 @@ You can use bsdsfv on your own computer as well as on your site.
It is known to be very flexible and can be used by other programs.
It is released under the terms of the BSD license.
-Added option COLOR=yes if you want color in output,
-it's very useful if you check big sfv files to find errors fast.
+Compile time option: by default, bsdsfv is built with color output
+support, which is very useful if you're checking big sfv files to find
+errors fast. You can export COLOR=no in the script's environment if
+you don't want color output.
+
+Note: there's no man page for bsdsfv. The documentation can be found
+in /usr/doc/bsdsfv-$VERSION/MANUAL instead.
diff --git a/misc/bsdsfv/bsdsfv.SlackBuild b/misc/bsdsfv/bsdsfv.SlackBuild
index ec0ca1d75daec..f13cbb03bfe6b 100644
--- a/misc/bsdsfv/bsdsfv.SlackBuild
+++ b/misc/bsdsfv/bsdsfv.SlackBuild
@@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220404 bkw: Modified by SlackBuilds.org, BUILD=3:
+# - do not install non-troff MANUAL in /usr/man (use /usr/doc instead).
+# - enable COLOR=yes by default (COLOR=no supported still).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=bsdsfv
VERSION=${VERSION:-1.18}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +42,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
@@ -49,7 +50,6 @@ fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-COLOR=${COLOR:-no}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
@@ -59,43 +59,41 @@ elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT $PKG/usr/bin
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
tar -xvzf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
mv $PRGNAM $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION || exit 1
+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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
#64bit patch borrowed from gentoo
patch -p1 < $CWD/bsdsfv-1.18-64bit.patch
-if [ "$COLOR" != no ]; then
+if [ "${COLOR:-yes}" != no ]; then
#colorpatch made with help of pj's old gentoo patch
patch -p1 < $CWD/bsdsfv-1.18-color.patch
fi
-make CFLAGS="$SLKCFLAGS -Wall" || exit 1
-make INSTALL_PREFIX=$PKG/usr install || exit 1
+make CFLAGS="$SLKCFLAGS -Wall"
+make INSTALL_PREFIX=$PKG/usr install
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/usr/man/man1
-cp MANUAL $PKG/usr/man/man1/bsdsfv.1
-( 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
- )
+# 20220404 bkw: the MANUAL file is *not* a man page, and should not be
+# installed to /usr/man.
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README MANUAL $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install