summaryrefslogtreecommitdiffstats
path: root/misc/bsdsfv/bsdsfv.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/bsdsfv/bsdsfv.SlackBuild')
-rw-r--r--misc/bsdsfv/bsdsfv.SlackBuild36
1 files changed, 17 insertions, 19 deletions
diff --git a/misc/bsdsfv/bsdsfv.SlackBuild b/misc/bsdsfv/bsdsfv.SlackBuild
index ec0ca1d75d..f13cbb03bf 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