academic/units: Fix paths and run install-info

Thanks to @urchlay for the fixes.

Signed-off-by: ArTourter <artourter@gmail.com>
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
ArTourter 2023-07-31 22:59:48 +01:00 committed by Willy Sudiarto Raharjo
parent d578b7cbf8
commit 477d6de596
No known key found for this signature in database
GPG key ID: 3F617144D7238786
3 changed files with 19 additions and 4 deletions

3
academic/units/doinst.sh Normal file
View file

@ -0,0 +1,3 @@
if [ -x /usr/bin/install-info ]; then
/usr/bin/install-info --info-dir=usr/info usr/info/units.info.gz 1> /dev/null 2>&1
fi

View file

@ -0,0 +1,9 @@
if [ -x /usr/bin/install-info -a -d usr/info ]; then
(
cd usr/info
rm -f dir
for i in *.info*; do
/usr/bin/install-info $i dir 1>/dev/null 2>&1
done
)
fi

View file

@ -3,7 +3,7 @@
# Slackware build script for gnu units
# Copyright (c) 2010-2021 Gregory J. L. Tourte <artourter@gmail.com>
# Copyright (c) 2010-2023 Gregory J. L. Tourte <artourter@gmail.com>
# Previously maintained by Yalla-One <yallaone@gmail.com>
# All rights reserved.
#
@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=units
VERSION=${VERSION:-2.22}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -93,6 +93,7 @@ CXXFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--localstatedir=/var \
--datadir=/usr/share \
--sharedstatedir=/usr/share \
--build=$ARCH-slackware-linux
make
@ -109,11 +110,13 @@ rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a INSTALL COPYING NEWS README units.pdf $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING NEWS README units.pdf $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
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