aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorCCHsu <a12321aabb@gmail.com>2014-06-21 18:48:35 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-06-21 18:48:35 +0700
commitf41d295c6ecd25f258bd348dd9836f858a30e16f (patch)
treeaad64ed843b3d3f7640ab72955b3caad543da799 /system
parent512a4223cd67034dfeca6440cf8cfe24bd109c81 (diff)
system/CNS11643-font: Added (Chinese Ming and Kai font).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/CNS11643-font/35-CNS11643-font.conf113
-rw-r--r--system/CNS11643-font/CNS11643-font.SlackBuild71
-rw-r--r--system/CNS11643-font/CNS11643-font.info10
-rw-r--r--system/CNS11643-font/README13
-rw-r--r--system/CNS11643-font/doinst.sh11
-rw-r--r--system/CNS11643-font/slack-desc19
6 files changed, 237 insertions, 0 deletions
diff --git a/system/CNS11643-font/35-CNS11643-font.conf b/system/CNS11643-font/35-CNS11643-font.conf
new file mode 100644
index 000000000000..9a7c7ddea6bb
--- /dev/null
+++ b/system/CNS11643-font/35-CNS11643-font.conf
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- TW-Kai and TW-Sung Configure File -->
+<fontconfig>
+ <match target="font">
+ <test qual="any" name="family">
+ <string>TW-Sung</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正宋體</string>
+ </test>
+ <test qual="any" name="family">
+ <string>TW-Sung-Plus</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正宋體 Plus</string>
+ </test>
+ <test qual="any" name="family">
+ <string>TW-Sung-Ext-B</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正宋體 Ext-B</string>
+ </test>
+ <test qual="any" name="family">
+ <string>TW-Kai</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正楷體</string>
+ </test>
+ <test qual="any" name="family">
+ <string>TW-Kai-Plus</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正楷體 Plus</string>
+ </test>
+ <test qual="any" name="family">
+ <string>TW-Kai-Ext-B</string>
+ </test>
+ <test qual="any" name="family">
+ <string>全字庫正楷體 Ext-B</string>
+ </test>
+ </match>
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>TW-Sung</string>
+ </test>
+ <edit name="family" mode="prepend" binding="strong">
+ <string>DejaVu Serif</string>
+ </edit>
+ </match>
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>TW-Kai</string>
+ </test>
+ <edit name="family" mode="prepend" binding="strong">
+ <string>DejaVu Sans Light</string>
+ </edit>
+ </match>
+ <alias>
+ <family>TW-Sung</family>
+ <prefer>
+ <family>DejaVu Serif:book</family>
+ <family>Liberation Sans</family>
+ <family>Bitstream Vera Serif</family>
+ <family>TW-Sung</family>
+ <family>TW-Sung-Plus</family>
+ <family>TW-Sung-Ext-B</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>TW-Kai</family>
+ <prefer>
+ <family>DejaVu Sans Light:book</family>
+ <family>Bitstream Vera Sans</family>
+ <family>TW-Kai</family>
+ <family>TW-Kai-Plus</family>
+ <family>TW-Kai-Ext-B</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>serif</family>
+ <prefer>
+ <family>DejaVu Serif:book</family>
+ <family>Liberation Serif</family>
+ <family>Bitstream Vera Serif</family>
+ <family>TW-Sung</family>
+ <family>TW-Sung-Plus</family>
+ <family>TW-Sung-Ext-B</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>sans</family>
+ <prefer>
+ <family>DejaVu Sans Light:book</family>
+ <family>Liberation Sans</family>
+ <family>Bitstream Vera Sans</family>
+ <family>TW-Kai</family>
+ <family>TW-Kai-Plus</family>
+ <family>TW-Kai-Ext-B</family>
+ </prefer>
+ </alias>
+ <alias>
+ <family>monospace</family>
+ <prefer>
+ <family>DejaVu Sans Mono</family>
+ <family>Liberation Sans Mono</family>
+ <family>Bitstream Vera Sans Mono</family>
+ <family>TW-Sung</family>
+ <family>TW-Sung-Plus</family>
+ <family>TW-Sung-Ext-B</family>
+ </prefer>
+ </alias>
+</fontconfig>
diff --git a/system/CNS11643-font/CNS11643-font.SlackBuild b/system/CNS11643-font/CNS11643-font.SlackBuild
new file mode 100644
index 000000000000..8962398bcff3
--- /dev/null
+++ b/system/CNS11643-font/CNS11643-font.SlackBuild
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# Slackware build script for CNS11643-font
+
+# Copyright 2014 CCHsu, Taiwan
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=CNS11643-font
+VERSION=${VERSION:-20140607}
+SRCNAM=Open_Data
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+mkdir $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+unzip $CWD/$SRCNAM.zip "Open_Data/Fonts/*.ttf"
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p $PKG/usr/share/fonts/TTF
+cp -a Open_Data/Fonts/*.ttf $PKG/usr/share/fonts/TTF
+
+# Create a font config file and symlink it into /etc/fonts/conf.d.
+mkdir -p $PKG/etc/fonts/conf.{d,avail}
+cat $CWD/35-CNS11643-font.conf > $PKG/etc/fonts/conf.avail/35-CNS11643-font.conf
+( cd $PKG/etc/fonts/conf.d && \
+ ln -sf ../conf.avail/35-CNS11643-font.conf
+)
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/CNS11643-font/CNS11643-font.info b/system/CNS11643-font/CNS11643-font.info
new file mode 100644
index 000000000000..b4822f0aac32
--- /dev/null
+++ b/system/CNS11643-font/CNS11643-font.info
@@ -0,0 +1,10 @@
+PRGNAM="CNS11643-font"
+VERSION="20140607"
+HOMEPAGE="http://www.cns11643.gov.tw/"
+DOWNLOAD="http://www.cns11643.gov.tw/AIDB/Open_Data.zip"
+MD5SUM="70639516aa66b61e10f640f07436183b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="CCHsu"
+EMAIL="a12321aabb@gmail.com"
diff --git a/system/CNS11643-font/README b/system/CNS11643-font/README
new file mode 100644
index 000000000000..41daa928ff5a
--- /dev/null
+++ b/system/CNS11643-font/README
@@ -0,0 +1,13 @@
+This package contains two type of fonts: TW-Kai and TW-Sung, which are
+provided by CNS11643 Chinese Standard Interchange Code Master Ideographs
+from Taiwan.
+
+This SlackBuild puts 35-CNS11643-font.conf into /etc/fonts/conf.avail.
+It sets the "serif" and "monospace"aliases to TW-Sung fonts, the "sans"
+aliases to TW-Kai fonts. You canuncomment the symlink in the slackbuild
+if you like.
+
+The source file can be found at "http://data.gov.tw/node/5961", and the
+license can be found at "http://www.cns11643.gov.tw/AIDB/copyright.do".
+Note that the license is CC BY-ND ("http://www.cns11643.gov.tw/AIDB/
+news_view.do?sn=bv"). \ No newline at end of file
diff --git a/system/CNS11643-font/doinst.sh b/system/CNS11643-font/doinst.sh
new file mode 100644
index 000000000000..8fec9f534006
--- /dev/null
+++ b/system/CNS11643-font/doinst.sh
@@ -0,0 +1,11 @@
+# Update the X font indexes:
+if [ -x /usr/bin/mkfontdir ]; then
+ ( cd /usr/share/fonts/TTF
+ mkfontscale .
+ mkfontdir .
+ )
+fi
+
+if [ -x /usr/bin/fc-cache ]; then
+ /usr/bin/fc-cache -f
+fi
diff --git a/system/CNS11643-font/slack-desc b/system/CNS11643-font/slack-desc
new file mode 100644
index 000000000000..ce28c24a9e3c
--- /dev/null
+++ b/system/CNS11643-font/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+CNS11643-font: CNS11643-font (Chinese Ming and Kai font)
+CNS11643-font:
+CNS11643-font: These fonts are provided by CNS11643 Chinese Standard Interchange
+CNS11643-font: Code Master Ideographs from Taiwan.
+CNS11643-font: This package contains two type of fonts: TW-Kai and TW-Sung. Both
+CNS11643-font: fonts supports traditional and simplified Chinese.
+CNS11643-font: The license can be found at http://www.cns11643.gov.tw/AIDB
+CNS11643-font: /copyright.do (in Chinese).
+CNS11643-font:
+CNS11643-font: Homepage: http://www.cns11643.gov.tw/
+CNS11643-font: