aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArTourter <artourter@gmail.com>2023-07-31 22:59:48 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-08-05 10:08:41 +0700
commit477d6de596cc767780302f1fefb386b9db3113e7 (patch)
tree2ea76e8b5b2fc0fa8ebfbfc3cf343dd7c65c2da8
parentd578b7cbf804d5838c723d10d809df938aa34fe1 (diff)
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>
-rw-r--r--academic/units/doinst.sh3
-rw-r--r--academic/units/douninst.sh9
-rw-r--r--academic/units/units.SlackBuild11
3 files changed, 19 insertions, 4 deletions
diff --git a/academic/units/doinst.sh b/academic/units/doinst.sh
new file mode 100644
index 0000000000000..40e776ac6865c
--- /dev/null
+++ b/academic/units/doinst.sh
@@ -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
diff --git a/academic/units/douninst.sh b/academic/units/douninst.sh
new file mode 100644
index 0000000000000..0273142e5cf56
--- /dev/null
+++ b/academic/units/douninst.sh
@@ -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
diff --git a/academic/units/units.SlackBuild b/academic/units/units.SlackBuild
index b107063d3a7b1..c331294e94d39 100644
--- a/academic/units/units.SlackBuild
+++ b/academic/units/units.SlackBuild
@@ -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