summaryrefslogtreecommitdiffstats
path: root/liberation-fonts
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-03-27 11:37:11 +0000
committer Eric Hameleers <alien@slackware.com>2008-03-27 11:37:11 +0000
commit1d26a1ecbe07fb56ffdadcd6476280dcebe4099c (patch)
treee7879f3cd414d6031d24797f0e93562720a619a6 /liberation-fonts
parentfff0c41191fcb878a71b96911ab2deaa60d5c068 (diff)
downloadasb-1d26a1ecbe07fb56ffdadcd6476280dcebe4099c.tar.gz
asb-1d26a1ecbe07fb56ffdadcd6476280dcebe4099c.tar.xz
First release of the final font, including font hinting.
Diffstat (limited to 'liberation-fonts')
-rwxr-xr-xliberation-fonts/build/liberation-fonts.SlackBuild50
1 files changed, 31 insertions, 19 deletions
diff --git a/liberation-fonts/build/liberation-fonts.SlackBuild b/liberation-fonts/build/liberation-fonts.SlackBuild
index 7f96cb56..19734404 100755
--- a/liberation-fonts/build/liberation-fonts.SlackBuild
+++ b/liberation-fonts/build/liberation-fonts.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2007 Eric Hameleers <alien@slackware.com>
+# Copyright (c) 2007-2008 Eric Hameleers <alien@slackware.com>
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -36,6 +36,14 @@
# The version '0.1' follows the Redhat package.
# 0.1-2: 12/May/2007 by Eric Hameleers <alien@slackware.com>
# * Got rid of absolute paths in the doinst.sh.
+# 1.0-1: 27/mar/2008 by Eric Hameleers <alien@slackware.com>
+# * Final release of the ttf font including font hinting.
+# Also added a fontconfig file to define liberation-fonts as the
+# substitute for MS Arial/Courier/Times fonts.
+# From the RedHat press release:
+# This updated package upgrades liberation-fonts to the
+# most recent version, which contains many improvements
+# and some fixes for defects in the previous version.
#
# Run 'sh liberation-fonts.SlackBuild --cleanup' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -45,10 +53,10 @@
# Set initial variables:
PRGNAM=liberation-fonts
-VERSION=${VERSION:-0.1}
+VERSION=${VERSION:-1.0}
ARCH=noarch
-BUILD=${BUILD:-2}
-DOCS="Liberation*Fonts*License*Terms.txt"
+BUILD=${BUILD:-1}
+DOCS="COPYING License.txt"
# Where do we look for sources?
CWD=`pwd`
@@ -60,9 +68,8 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Make sure you edit SRCURL when you change the program's VERSION
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
-SRCURL="http://www.redhat.com/f/fonts/liberation-fonts-ttf.tar.gz"
+SRCURL="https://www.redhat.com/f/fonts/liberation-fonts.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -76,14 +83,9 @@ set -u
P1=${1:-1}
# Create working directories:
-if [ ! -d $PKG ]; then
- mkdir -p $PKG # place for the package to be built
-else
- rm -rf $PKG/* # We always erase old package's contents:
-fi
-if [ ! -d $OUTPUT ]; then
- mkdir -p $OUTPUT # place for the package to be saved
-fi
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # erase old package's contents
+mkdir -p $OUTPUT # place for the package to be saved
# Download sources if needed:
if ! [ -f ${SOURCE} ]; then
@@ -92,8 +94,8 @@ if ! [ -f ${SOURCE} ]; then
[ -w "$SRCDIR" ] || SOURCE="$OUTPUT/`basename $SOURCE`"
echo "Source '`basename ${SOURCE}`' not available yet..."
echo "Will download file to `dirname $SOURCE`"
- wget -nv -O "${SOURCE}" "${SRCURL}" || true
- if [ $? -ne 0 ]; then
+ wget -nv -T 20 --no-check-certificate -O "${SOURCE}" "${SRCURL}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
echo "Downloading '`basename ${SOURCE}`' failed... aborting the build."
mv -f "${SOURCE}" "${SOURCE}".FAIL
exit 1
@@ -132,25 +134,35 @@ cd $PKG$FONTDIR
# Extraction point:
echo "Extracting the source archive(s) for $PRGNAM..."
tar -C $PKG$FONTDIR -xzvf ${SOURCE}
+mv liberation-fonts/* .
+rmdir liberation-fonts
chown -R root:root *
chmod -R u+w,go+r-w,a-s *
+# Add the fontconfig file and symlink.
+mkdir -p $PKG/etc/fonts/conf.{d,avail}
+cp $SRCDIR/60-liberation.conf $PKG/etc/fonts/conf.avail/
+( cd $PKG/etc/fonts/conf.d && \
+ ln -sf ../conf.avail/60-liberation.conf
+)
+
# 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
- .$XPREF/bin/mkfontscale .$FONTDIR
- .$XPREF/bin/mkfontdir .$FONTDIR
+ chroot . $XPREF/bin/mkfontscale $FONTDIR
+ chroot . $XPREF/bin/mkfontdir $FONTDIR
fi
if [ -x .$XPREF/bin/fc-cache ]; then
- .$XPREF/bin/fc-cache .$FONTDIR
+ chroot . $XPREF/bin/fc-cache -f $FONTDIR
fi
EOT
# Documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
# Package description:
mkdir -p $PKG/install