mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
Add Unicode fonts
This commit is contained in:
parent
1eaa759ae7
commit
01fe095ffc
1 changed files with 67 additions and 0 deletions
|
@ -0,0 +1,67 @@
|
|||
#!/bin/sh
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
VERSION=${VERSION:-$(date +%Y.%m.%d_%H.%M)}
|
||||
ARCH=noarch
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-cyco}
|
||||
|
||||
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
|
||||
TMP=${TMP:=/tmp/$TAG}
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
# Create working directories:
|
||||
rm -rf $PKG
|
||||
mkdir -p $OUTPUT
|
||||
mkdir -p $PKG
|
||||
|
||||
TTFDIR=/usr/share/fonts/TTF
|
||||
OTFDIR=/usr/share/fonts/OTF
|
||||
|
||||
# Move the fonts into place:
|
||||
mkdir -p $PKG$OTFDIR $PKG$TTFDIR $PKG/usr/doc/$PRGNAM
|
||||
cd $PKG$TTFDIR/
|
||||
|
||||
for i in Aegean600.zip Aegyptus313.zip Gardiner313.zip Symbola605.zip Alfios.zip Aroania.zip Alexander.zip Anaktoria.zip Avdira.zip Atavyros.zip Analecta306.zip Musica306.zip Akkadian256.zip Anatolian306.zip Maya106.zip Unidings605.zip; do
|
||||
[ ! -e $CWD/$i ] && wget -c http://users.teilar.gr/~g1951d/$i -O $CWD/$i
|
||||
unzip -o $CWD/$i
|
||||
done
|
||||
find . -type f -iname \*.otf -exec mv {} $PKG$OTFDIR \;
|
||||
find . -type f -not -iname \*.ttf -exec mv {} $PKG/usr/doc/$PRGNAM \;
|
||||
find . -type d -delete
|
||||
|
||||
# Post-install script:
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOT > $PKG/install/doinst.sh
|
||||
# Update X font indexes and the font cache:
|
||||
if [ -x .$XPREF/bin/mkfontdir ]; then
|
||||
chroot . $XPREF/bin/mkfontscale $TTFDIR
|
||||
chroot . $XPREF/bin/mkfontdir $TTFDIR
|
||||
fi
|
||||
if [ -x .$XPREF/bin/fc-cache ]; then
|
||||
chroot . $XPREF/bin/fc-cache -f $TTFDIR
|
||||
fi
|
||||
EOT
|
||||
|
||||
# Add a package description:
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Unicode Fonts for Ancient Scripts)
|
||||
$PRGNAM:
|
||||
$PRGNAM: As recommended @
|
||||
$PRGNAM: http://98.245.80.27/tcpc/OSCON2011/gbu/gbu.html
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://users.teilar.gr/~g1951d/
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
# Build the package:
|
||||
cd $PKG
|
||||
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz
|
Loading…
Reference in a new issue