65 lines
1.8 KiB
Bash
Executable file
65 lines
1.8 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
cd "$(dirname "$0")" || exit 1
|
|
CWD=$(pwd)
|
|
|
|
PKGNAM=$(basename "$CWD")
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-gwh}
|
|
|
|
TMP=${TMP:-/tmp/$TAG}
|
|
PKG=$TMP/package-$PKGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
rm -rf "$PKG"
|
|
|
|
mkdir -p "$PKG"/usr/share/fonts/TTF/
|
|
cd "$PKG"/usr/share/fonts/TTF/ || exit 1
|
|
|
|
wget -c "https://files.ax86.net/terminus-ttf/files/latest.zip"
|
|
unzip latest.zip
|
|
rm latest.zip
|
|
|
|
VERSION=$(echo terminus-ttf-*/ | rev | cut -f 1 -d - | rev | sed 's|/$||')
|
|
chmod 0644 "terminus-ttf-${VERSION}"/*
|
|
|
|
mv "terminus-ttf-${VERSION}"/*.ttf .
|
|
mkdir -p "$PKG"/usr/doc/
|
|
mv "terminus-ttf-${VERSION}"/ "$PKG"/usr/doc/terminus-ttf
|
|
|
|
mkdir -p "$PKG"/install
|
|
cat <<EOF > "$PKG"/install/slack-desc
|
|
# 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 ':'.
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
$PKGNAM: $PKGNAM (a clean fixed width font)
|
|
$PKGNAM:
|
|
$PKGNAM: TTF format addition to the official terminus-font package.
|
|
$PKGNAM:
|
|
$PKGNAM:
|
|
$PKGNAM:
|
|
$PKGNAM:
|
|
$PKGNAM: Homepage: http://$PKGNAM.sourceforge.net
|
|
$PKGNAM: https://files.ax86.net/terminus-ttf/
|
|
$PKGNAM:
|
|
$PKGNAM:
|
|
EOF
|
|
|
|
cat <<EOF > "$PKG"/install/doinst.sh
|
|
#!/bin/sh
|
|
# Update the X font indexes:
|
|
if [ -x /usr/bin/mkfontdir -o -x /usr/X11R6/bin/mkfontdir ]; then
|
|
mkfontdir usr/share/fonts/TTF 2> /dev/null
|
|
fi
|
|
if [ -x /usr/bin/fc-cache ]; then
|
|
/usr/bin/fc-cache -f 2> /dev/null
|
|
fi
|
|
EOF
|
|
|
|
cd "$PKG" || exit 1
|
|
/sbin/makepkg --linkadd y --chown n --prepend "$OUTPUT/$PKGNAM-$VERSION-noarch-$BUILD$TAG.txz"
|