summaryrefslogtreecommitdiffstats
path: root/system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild')
-rw-r--r--system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild38
1 files changed, 20 insertions, 18 deletions
diff --git a/system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild b/system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild
index b55b37fbea..12834f5996 100644
--- a/system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild
+++ b/system/ttf-paratype-pt-fonts/ttf-paratype-pt-fonts.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for ttf-paratype-pt-fonts
-# Copyright 2016, Alexander Verbovetsky, Moscow, Russia
+# Copyright 2016-2020, Alexander Verbovetsky, Moscow, Russia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +22,24 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=ttf-paratype-pt-fonts
-VERSION=${VERSION:-2.5_1.2_1.3} # Sans_Serif_Mono
+VERSION=${VERSION:-2019}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
-CWD=$(pwd)
+# 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
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -38,15 +48,10 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-mkdir -p $PRGNAM-$VERSION
-cd $PRGNAM-$VERSION
-unzip $CWD/PTSansOFL.zip
-rm PTSSM_OFL.txt
-unzip $CWD/PTSerifOFL.zip
-rm PTSSM_OFL.txt
-unzip $CWD/PTMonoOFL.zip
+mkdir -p $PKG/usr/share/fonts/TTF
+unzip -j "$CWD/*.zip" *.ttf -d $PKG/usr/share/fonts/TTF
+
+cd $PKG/usr/share/fonts/TTF
chown -R root:root .
find -L . \
@@ -55,11 +60,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-mkdir -p $PKG/usr/share/fonts/TTF
-cp -a *.ttf $PKG/usr/share/fonts/TTF
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a PTSSM_OFL.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $CWD/OFL.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/etc/fonts/conf.{d,avail}
@@ -72,4 +74,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE