aboutsummaryrefslogtreecommitdiff
path: root/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild')
-rw-r--r--system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild21
1 files changed, 14 insertions, 7 deletions
diff --git a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild
index 8991fceab0..9fd53fee07 100644
--- a/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild
+++ b/system/ttf-ubuntu-font-family/ttf-ubuntu-font-family.SlackBuild
@@ -5,6 +5,8 @@
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
# Copyright 2010-2012 Binh Nguyen <binhvng@gmail.com>
+# Copyright 2017-2024 klaatu <klaatu@member.fsf.org>
+# Copyright 2025 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,15 +30,14 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=ttf-ubuntu-font-family
VERSION=${VERSION:-0.83}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
ARCH=noarch
+SRCNAM=ubuntu-font-family
+SRCPREFIX=0cef8205
-# 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
@@ -51,9 +52,9 @@ set -eu
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf ubuntu-font-family-$VERSION
-unzip $CWD/ubuntu-font-family-$VERSION.zip
-cd ubuntu-font-family-$VERSION
+rm -rf $SRCNAM-$VERSION
+unzip $CWD/$SRCPREFIX-$SRCNAM-$VERSION.zip $SRCNAM-$VERSION/* || unzip $CWD/$SRCNAM-$VERSION.zip $SRCNAM-$VERSION/*
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -64,6 +65,12 @@ find -L . \
mkdir -p $PKG/usr/share/fonts/TTF
cp -a *.ttf $PKG/usr/share/fonts/TTF
+# Font fixes. This is taken and adapted from Arch Linux repos:
+# https://gitlab.archlinux.org/archlinux/packaging/packages/ttf-ubuntu-font-family/-/blob/main/81-ubuntu.conf
+mkdir -p $PKG/etc/fonts/conf.d $PKG/etc/fonts/conf.avail
+cp $CWD/81-ubuntu.conf $PKG/etc/fonts/conf.avail/81-ubuntu.conf
+ln -s ../conf.avail/81-ubuntu.conf $PKG/etc/fonts/conf.d/81-ubuntu.conf
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild