system/wdiff: Handle /usr/info/dir.

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

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-07-08 01:39:19 -04:00 committed by Willy Sudiarto Raharjo
parent 870dd7f561
commit 317b7eede5
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 17 additions and 8 deletions

6
system/wdiff/doinst.sh Normal file
View File

@ -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

View File

@ -6,13 +6,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230708 bkw: BUILD=3, add doinst/douninst for .info files.
# 20210809 bkw: BUILD=2, --enable-experimental
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wdiff
VERSION=${VERSION:-1.2.2}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -56,8 +57,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
# The --enable-experimental option builds mdiff, wdiff2, and unify. These
# look useful enough to include in the build.
@ -77,15 +78,17 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/man/man1/*.1
gzip -9 $PKG/usr/man/man1/*.1 $PKG/usr/info/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS BACKLOG COPYING ChangeLog NEWS README THANKS TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a AUTHORS BACKLOG COPYING ChangeLog NEWS README THANKS TODO $PKGDOC
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/doinst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE