summaryrefslogtreecommitdiffstats
path: root/wqy-zenhei-font-ttf
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-02-09 23:59:05 +0000
committer Eric Hameleers <alien@slackware.com>2008-02-09 23:59:05 +0000
commitb9fcf0425cffc9b0d379c29acaff8441786d5f91 (patch)
tree13fb1ad59aad853c19d8b94140ce02056290de5c /wqy-zenhei-font-ttf
parent3076e74e45d8c171df3573c96e4c3275b327d25a (diff)
downloadasb-b9fcf0425cffc9b0d379c29acaff8441786d5f91.tar.gz
asb-b9fcf0425cffc9b0d379c29acaff8441786d5f91.tar.xz
Package renamed to wqy-zenhei-font-ttf; added the missing doinst.sh; removed superfluous patch.
Diffstat (limited to 'wqy-zenhei-font-ttf')
-rwxr-xr-xwqy-zenhei-font-ttf/build/wqy-zenhei-font-ttf.SlackBuild33
1 files changed, 23 insertions, 10 deletions
diff --git a/wqy-zenhei-font-ttf/build/wqy-zenhei-font-ttf.SlackBuild b/wqy-zenhei-font-ttf/build/wqy-zenhei-font-ttf.SlackBuild
index 9c0a0e45..ff9d8ab3 100755
--- a/wqy-zenhei-font-ttf/build/wqy-zenhei-font-ttf.SlackBuild
+++ b/wqy-zenhei-font-ttf/build/wqy-zenhei-font-ttf.SlackBuild
@@ -25,15 +25,17 @@
# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
-# For: wqy-zenhei
+# For: wqy-zenhei-font-ttf
# Descr: Wen Quan Yi Zen Hei CJK Font
# URL: http://wqy.sourceforge.net/en/
# Needs:
# Changelog:
# 0.2.15-1: 05/Feb/2008 by Eric Hameleers <alien@slackware.com>
# * Initial build.
+# 0.2.15-2: 10/Feb/2008 by Eric Hameleers <alien@slackware.com>
+# * Rename to wqy-zenhei-font-ttf
#
-# Run 'sh wqy-zenhei.SlackBuild --cleanup' to build a Slackware package.
+# Run 'sh wqy-zenhei-font-ttf.SlackBuild --cleanup' to build a Slackware package
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
@@ -41,11 +43,12 @@
# Set initial variables:
-PRGNAM=wqy-zenhei
+PRGNAM=wqy-zenhei-font-ttf
+SRCNAM=wqy-zenhei
VERSION=${VERSION:-0.2.15}
SUB=${SUB:-1}
ARCH=noarch
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
DOCS="AUTHORS COPYING ChangeLog INSTALL README"
@@ -60,8 +63,8 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# Input URL: http://downloads.sourceforge.net/wqy/wqy-zenhei-0.2.15-1.tar.gz
-SOURCE="$SRCDIR/${PRGNAM}-${VERSION}-${SUB}.tar.gz"
-SRCURL="http://downloads.sourceforge.net/wqy/${PRGNAM}-${VERSION}-${SUB}.tar.gz"
+SOURCE="$SRCDIR/${SRCNAM}-${VERSION}-${SUB}.tar.gz"
+SRCURL="http://downloads.sourceforge.net/wqy/${SRCNAM}-${VERSION}-${SUB}.tar.gz"
##
## --- with a little luck, you won't have to edit below this point --- ##
@@ -134,7 +137,7 @@ if $(file ${SOURCE} | grep -q ": bzip2"); then
elif $(file ${SOURCE} | grep -q ": gzip"); then
tar -xzvf ${SOURCE}
fi
-mv ${PRGNAM} ${PRGNAM}-${VERSION}
+mv ${SRCNAM} ${PRGNAM}-${VERSION}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -143,15 +146,25 @@ chmod -R u+w,go+r-w,a-s .
cp *.ttf $PKG$FONTDIR/
# Add the fontconfig file and symlink.
-# The patch makes the wqy-zenhei directory visible to fontconfig:
mkdir -p $PKG/etc/fonts/conf.{d,avail}
cp 44-wqy-zenhei.conf $PKG/etc/fonts/conf.avail/
-patch -p0 $PKG/etc/fonts/conf.avail/44-wqy-zenhei.conf \
- < $SRCDIR/wqy-zenhei_fontconfig.patch
( cd $PKG/etc/fonts/conf.d && \
ln -sf ../conf.avail/44-wqy-zenhei.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
+ chroot . $XPREF/bin/mkfontscale $FONTDIR
+ chroot . $XPREF/bin/mkfontdir $FONTDIR
+ fi
+ if [ -x .$XPREF/bin/fc-cache ]; then
+ chroot . $XPREF/bin/fc-cache $FONTDIR
+ fi
+ EOT
+
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true