add averia font
This commit is contained in:
parent
a105297542
commit
221407c92e
1 changed files with 64 additions and 0 deletions
64
fonts/averia/averia.SlackBuild
Executable file
64
fonts/averia/averia.SlackBuild
Executable file
|
@ -0,0 +1,64 @@
|
|||
#!/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
|
||||
|
||||
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:
|
||||
if [ -x .$XPREF/bin/mkfontdir ]; then
|
||||
chroot . $XPREF/bin/mkfontscale $FONTDIR
|
||||
chroot . $XPREF/bin/mkfontdir $FONTDIR
|
||||
fi
|
||||
if [ -x .$XPREF/bin/fc-cache ]; then
|
||||
chroot . $XPREF/bin/fc-cache -f $FONTDIR
|
||||
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
|
||||
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz
|
Loading…
Add table
Reference in a new issue