Browse Source

development/dasm: Add doinst/douninst for man database.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
pull/241/head
B. Watson 1 year ago
committed by Willy Sudiarto Raharjo
parent
commit
28fe8403d1
No known key found for this signature in database GPG Key ID: 3F617144D7238786
  1. 13
      development/dasm/dasm.SlackBuild
  2. 4
      development/dasm/doinst.sh
  3. 3
      development/dasm/douninst.sh

13
development/dasm/dasm.SlackBuild

@ -6,11 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20240812 bkw: BUILD=2
# - add doinst.sh and douninst.sh, to handle the man -k database.
# this is a prototype/testcase for a future addition to the
# template.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dasm
VERSION=${VERSION:-2.20.14.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -33,16 +38,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
@ -96,6 +97,8 @@ cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/douninst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

4
development/dasm/doinst.sh

@ -0,0 +1,4 @@
if [ -x usr/bin/mandb ]; then
usr/bin/mandb -f /usr/man/man1/dasm.1.gz &> /dev/null
usr/bin/mandb -f /usr/man/man1/ftohex.1.gz &> /dev/null
fi

3
development/dasm/douninst.sh

@ -0,0 +1,3 @@
if [ -x usr/bin/mandb ]; then
usr/bin/mandb &> /dev/null
fi
Loading…
Cancel
Save