slackbuilds/UNUSED/fonts/averia/SlackBuild

66 lines
1.4 KiB
Text
Raw Normal View History

2012-02-06 17:10:54 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=${VERSION:-$(date +%Y.%m.%d_%H.%M)}
ARCH=noarch
BUILD=${BUILD:-1}
2020-06-25 11:23:11 +02:00
TAG=${TAG:-gwh}
2012-02-06 17:10:54 +01:00
# 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
FONTDIR=/usr/share/fonts/TTF
# Move the fonts into place:
mkdir -p $PKG$FONTDIR $PKG/usr/doc/$PRGNAM
cd $PKG$FONTDIR/
for i in Averia.zip AveriaSerif.zip AveriaSans.zip AveriaGWF.zip AveriaGWFSerif.zip AveriaGWFSans.zip ; do
[ ! -e $CWD/$i ] && wget -c http://iotic.com/averia/font-files/$i -O $CWD/$i
unzip -o $CWD/$i
done
mv *.txt $PKG/usr/doc/$PRGNAM
rm -fr __MACOSX/
# Post-install script:
mkdir -p $PKG/install
cat <<EOT > $PKG/install/doinst.sh
# Update X font indexes and the font cache:
2013-09-25 10:21:30 +02:00
if [ -x ./usr/bin/mkfontdir ]; then
chroot . /usr/bin/mkfontscale $FONTDIR
chroot . /usr/bin/mkfontdir $FONTDIR
2012-02-06 17:10:54 +01:00
fi
2013-09-25 10:21:30 +02:00
if [ -x ./usr/bin/fc-cache ]; then
chroot . /usr/bin/fc-cache -f $FONTDIR
2012-02-06 17:10:54 +01:00
fi
EOT
# Add a package description:
mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc
$PRGNAM: $PRGNAM (font)
$PRGNAM:
$PRGNAM: "Average[d]" font
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://iotic.com/averia/
$PRGNAM:
EOF
# Build the package:
cd $PKG
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2020-07-12 09:22:26 +02:00
/sbin/makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz