summaryrefslogtreecommitdiffstats
path: root/misc/pinfo
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-03-08 01:38:04 -0500
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-03-12 08:48:28 +0700
commit562c2d88385114b783822a9ac8a721d74c7546e4 (patch)
tree56d7a5f8cd91de95e9655aef42bc5c7f18c28ece /misc/pinfo
parent7d0876d71fb1acd7999fcd9c61f95e28b87acd81 (diff)
downloadslackbuilds-562c2d88385114b783822a9ac8a721d74c7546e4.tar.gz
slackbuilds-562c2d88385114b783822a9ac8a721d74c7546e4.tar.xz
misc/pinfo: Add douninst.sh.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/pinfo')
-rw-r--r--misc/pinfo/doinst.sh5
-rw-r--r--misc/pinfo/douninst.sh6
-rw-r--r--misc/pinfo/pinfo.SlackBuild5
3 files changed, 11 insertions, 5 deletions
diff --git a/misc/pinfo/doinst.sh b/misc/pinfo/doinst.sh
index 3354151c29..d514aad218 100644
--- a/misc/pinfo/doinst.sh
+++ b/misc/pinfo/doinst.sh
@@ -1,18 +1,15 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
rm $NEW
fi
- # Otherwise, we leave the .new copy for the admin to consider...
}
config etc/pinforc.new
if [ -x /usr/bin/install-info ]; then
- chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/pinfo.info.gz 2> /dev/null
+ /usr/bin/install-info usr/info/pinfo.info.gz usr/info/dir
fi
diff --git a/misc/pinfo/douninst.sh b/misc/pinfo/douninst.sh
new file mode 100644
index 0000000000..1bef502028
--- /dev/null
+++ b/misc/pinfo/douninst.sh
@@ -0,0 +1,6 @@
+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 2>/dev/null; done
+ )
+fi
diff --git a/misc/pinfo/pinfo.SlackBuild b/misc/pinfo/pinfo.SlackBuild
index e4325224fd..dcc2d2d05f 100644
--- a/misc/pinfo/pinfo.SlackBuild
+++ b/misc/pinfo/pinfo.SlackBuild
@@ -24,6 +24,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230308 bkw: BUILD=3, add douninst.sh to clean up GNU info dir.
+
# 20200708 bkw: BUILD=2
# - restore old 'pman' link (nothing conflicts)
# - fix homepage in slack-desc
@@ -39,7 +41,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pinfo
VERSION=${VERSION:-0.6.13}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -124,6 +126,7 @@ 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/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