summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-09 01:38:20 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-09 15:45:13 +0700
commit7472a2d62ea3419bbed6a2aeb17560aa2ba77c41 (patch)
treea75f13be8cc2f83e24af2f4e4ff0fba9e60866a3
parent8a92d487639131d39bb32eec31e8fac4add084f2 (diff)
downloadslackbuilds-7472a2d62ea3419bbed6a2aeb17560aa2ba77c41.tar.gz
graphics/fontforge: Fix doc dir and PRINT_PACKAGE_NAME.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--graphics/fontforge/fontforge.SlackBuild35
1 files changed, 19 insertions, 16 deletions
diff --git a/graphics/fontforge/fontforge.SlackBuild b/graphics/fontforge/fontforge.SlackBuild
index e69e132623..c63a69f8d4 100644
--- a/graphics/fontforge/fontforge.SlackBuild
+++ b/graphics/fontforge/fontforge.SlackBuild
@@ -31,11 +31,15 @@
# Update to Version ff 20190801, gnulib 20200505~0747bf0
# Added --without-libuninameslist
+# 20220409 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - make PRINT_PACKAGE_NAME work even if fontforge already installed.
+# - get rid of /usr/share/doc.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=fontforge
VERSION=${VERSION:-20201107}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -44,17 +48,6 @@ FREETYPE=${FREETYPE:-2.11.1}
GNULIB=${GNULIB:-0.1}
UTHASH=${UTHASH:-2.3.0}
-# This ought to be more reliable than testing if a package DB file
-# exists. A little convoluted perhaps.
-if $PRGNAM -v 2>/dev/null |
- sed -n "s,^\($PRGNAM .*\),Found existing installation:\n \n\1,p
- n;p;a\ " | grep -v "^$"; then
-
- echo "Please uninstall any previous versions of $PRGNAM before building
-a new one."
- exit 1
-fi
-
if [ -x /usr/bin/sphinx-build ]; then
DOCS=ON
fi
@@ -67,14 +60,22 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
+# This ought to be more reliable than testing if a package DB file
+# exists. A little convoluted perhaps.
+if $PRGNAM -v 2>/dev/null |
+ sed -n "s,^\($PRGNAM .*\),Found existing installation:\n \n\1,p
+ n;p;a\ " | grep -v "^$"; then
+
+ echo "Please uninstall any previous versions of $PRGNAM before building
+a new one."
+ exit 1
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -143,9 +144,11 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
cp -a AUTHORS LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-find $PKG/usr/doc -type f -exec chmod 644 {} \;
+find $PKG/usr/doc -type f -exec chmod 644 {} \+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc