diff options
| author | Giancarlo Dessì <slack@giand.it> | 2024-11-27 09:17:44 +0700 |
|---|---|---|
| committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-11-27 13:53:44 +0700 |
| commit | afaee25f474fa94ce561722f5ec56078a9fb7d61 (patch) | |
| tree | 85a002ba1c18fb69bc25ccd6ac4865d661cc336b /python | |
| parent | 75bff179408f63ccae36c40b7abdc8e0416a9c35 (diff) | |
python/findsystemfontsfilename: Added (Find the system fonts filename).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
4 files changed, 122 insertions, 0 deletions
diff --git a/python/findsystemfontsfilename/README b/python/findsystemfontsfilename/README new file mode 100644 index 0000000000..d32b7b5e4d --- /dev/null +++ b/python/findsystemfontsfilename/README @@ -0,0 +1,4 @@ +FindSystemFontsFilename is a tool that using the Fontconfig API allows +you to get the font filename on your system. It will collect TrueType +(.ttf), OpenType (.otf), TrueType Collection (.ttc) and OpenType +Collection (.otc) font format. diff --git a/python/findsystemfontsfilename/findsystemfontsfilename.SlackBuild b/python/findsystemfontsfilename/findsystemfontsfilename.SlackBuild new file mode 100644 index 0000000000..1ebdbd8538 --- /dev/null +++ b/python/findsystemfontsfilename/findsystemfontsfilename.SlackBuild @@ -0,0 +1,89 @@ +#!/bin/bash + +# Slackware build script for findsystemfontsfilename + +# Copyright 2024 Giancarlo Dessì, Cagliari, IT, <slack@giand.it> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# 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=findsystemfontsfilename +VERSION=${VERSION:-0.3.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])') +# In Slackware 15.0 the python3 version should be 3.9 +# as standard installation otherwise the SlackBuild script assumes that you are +# in -current +if [ $PYVER = "3.9" ]; then + export PYTHONPATH=/opt/python$PYVER/site-packages +fi + +python3 -m build --wheel --no-isolation + +python3 -m installer --destdir "$PKG" dist/*.whl + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE PKG-INFO README.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/python/findsystemfontsfilename/findsystemfontsfilename.info b/python/findsystemfontsfilename/findsystemfontsfilename.info new file mode 100644 index 0000000000..24a93ba97b --- /dev/null +++ b/python/findsystemfontsfilename/findsystemfontsfilename.info @@ -0,0 +1,10 @@ +PRGNAM="findsystemfontsfilename" +VERSION="0.3.1" +HOMEPAGE="https://github.com/moi15moi/FindSystemFontsFilename/" +DOWNLOAD="https://files.pythonhosted.org/packages/8f/22/6856cdc28f83f81b3ccecd5c23e0e75959e37dafac2d49687c88e1518558/findsystemfontsfilename-0.3.1.tar.gz" +MD5SUM="1523cb73777752f83040dcfa58bd74e7" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-setuptools-opt" +MAINTAINER="Giancarlo Dessì" +EMAIL="slack@giand.it" diff --git a/python/findsystemfontsfilename/slack-desc b/python/findsystemfontsfilename/slack-desc new file mode 100644 index 0000000000..899064c055 --- /dev/null +++ b/python/findsystemfontsfilename/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +findsystemfontsfilename: findsystemfontsfilename (Python utility based on Fontconfig API) +findsystemfontsfilename: +findsystemfontsfilename: This tool allows you to get the font filename on your system. It will +findsystemfontsfilename: collect TrueType (.ttf), OpenType (.otf), TrueType Collection (.ttc) +findsystemfontsfilename: and OpenType Collection (.otc) font format. +findsystemfontsfilename: +findsystemfontsfilename: +findsystemfontsfilename: Home page: https://github.com/moi15moi/FindSystemFontsFilename/ +findsystemfontsfilename: +findsystemfontsfilename: +findsystemfontsfilename: |
