#!/bin/sh # test we are root if [ "$(id -u)" != "0" ]; then exit 1 fi # no compiling # font selected based on post = https://bbs.archlinux.org/viewtopic.php?id=148553 P=wqy-zenhei-fonts-ttf V=0.8.38-1 SRC=wqy-zenhei USER=`cat /etc/sysconfig/tcuser` su -c "tce-load -i submitqc " $USER URL1=https://onboardcloud.dl.sourceforge.net/project/wqy/wqy-zenhei/0.8.38%20%28Pangu%29 URL2=https://gitlab.archlinux.org/archlinux/packaging/packages/wqy-zenhei/-/raw/main cd /tmp su -c "/usr/local/bin/wget -nc --no-check-certificate \ $URL1/wqy-zenhei-$V.tar.gz \ $URL2/44-wqy-zenhei.conf.diff?ref_type=heads " $USER # download of 44-wqy is not correct file structure fix it mv 44-wqy-zenhei.conf.diff\?ref_type=heads patch tar xvf wqy*gz chown -R root:root $SRC # already 644 except 755 for the exe cd $SRC patch -Np1 < ../patch cd /tmp # Package ########## the font is a single ttc file mkdir -p $P/usr/local/share/doc/$P echo 'GPL v 2' > $P/usr/local/share/doc/$P/COPYING mkdir -p $P/usr/local/share/fonts/$P mv $SRC/*.ttc $P/usr/local/share/fonts/$P mkdir -p $P/usr/local/etc/fonts/conf.d/ mv $SRC/44*conf $P/usr/local/etc/fonts/conf.d/ # tce.installed ############ mkdir -p $P/usr/local/tce.installed cat >> $P/usr/local/tce.installed/$P <<'EOF' #!/bin/sh fc-cache /usr/local/share/fonts/wqy-zenhei-fonts-ttf EOF chown -R root:staff $P/usr/local/tce.installed chmod -R 775 $P/usr/local/tce.installed # TCZ them ########### LIST="$P " for Z in $LIST do mksquashfs $Z $Z.tcz md5sum $Z.tcz > $Z.tcz.md5.txt cd $Z find . -not -type d | cut -c 2- | sort > /tmp/$Z.tcz.list cd /tmp done ls -hal echo 'Title: wqy-zenhei-fonts-ttf.tcz Description: Chinese font as below Version: 0.8.38-1 Author: WenQuanYi Board of Trustees as below Original-site: Download: https://sourceforge.net/projects/wqy/files/wqy-zenhei/ Owner site: http://wenq.org/wqy2/index.cgi?WQYBOT (English users, try online translation) Copying-policy: GPL v2 Size: 7.7M Extension_by: aus9 @ linuxquestions.org Tags: font Chinese Comments: Wang Hanzong bold regular simplified wts11.ttf Wang Hanzong Zhong Weibei Simplified wts43.ttf Wang Hanzong Zhong Fangsong Simplified wts47.ttf Wang Hanzong's new Song simplified wts55.ttf The WenQuanYi Zen Hei font is a Chinese (or CJK) outline font with Hei-Ti style (a sans-serif style) Hanzi glyphs. This font is developed for general purpose use of Chinese for formating, printing and on-screen display The Authors disabled the embedded bitmaps, so that the characters will be displayed as Anti-aliased glyphs. You should set up locale and also load TCEs that are locales, eg load lxterminal-locale not lxterminal Alternative TCE=notocjk-regular-fonts-ttc - 37M Change-log: 2024/11/09 any arch Current: 2024/11/09 ' > $P.tcz.info echo 'fontconfig.tcz' > $P.tcz.dep submitqc --libs rm -rf *.zsync