|
楼主 |
发表于 2003-7-11 21:36:01
|
显示全部楼层
hamigua-fontconfig-1.0-2.i386.rpm (升级过一次)包含两个文件:
/usr/bin/hamigua-fontconfig #这是一个bash shell 脚本.
/usr/share/hamigua-font.tar.bz2 #这是脚本运行过程需要的包,其中这包中包含这些文件:
fonts.conf
gtkrc.zh_CN
hamigua-XF86Config.patch
tahomabd.ttf
tahoma.ttf
verdanab.ttf
verdanai.ttf
verdana.ttf
verdanaz.ttf
xmms-config
下面我把这个shell脚本贴上来,希望能有同好一起来修改:
hamigua-fontconfig脚本
#!/bin/sh
HAMIGUAID=`id -u`
case $HAMIGUAID in
0)
;;
*)
echo "You is not a root userermission denied"
exit 1
;;
esac
echo "##############################################################
## It'll config your Chinese font Xft2 and gtk options ##
## Only RedHat Linux 8.0 or 9.0 release can run it! ##
## hamigua <hamigua@8bb8.com> Jul 8 , 2003 ##
## http://www.linuxsir.cn/ ##
##############################################################"
echo -n "Do you want to continue?(y/n)[y]"
read answer
echo " "
case $answer in
n*)
echo "Bye!"
exit 1
;;
*)
echo "OK,Let's go!"
;;
esac
echo "lease put simsun.ttc mingliu.ttc ... into /usr/share/fonts/ "
echo -n "Are you ready yet?(y/n)[y]"
read answer
echo " "
case $answer in
n*)
echo "You can run it again!Bye!"
exit 1
;;
*)
echo "It'll make you a few minutes,waiting......"
;;
esac
mkdir -p ~/hamigua > /dev/null
cd ~/hamigua > /dev/null
tar jvfx /usr/share/hamigua-font.tar.bz2 > /dev/null
cp -rf ~/hamigua/*.ttf /usr/share/fonts/ > /dev/null
fc-cache /usr/share/fonts/
mkdir -p /usr/share/fonts/local > /dev/null
ln -s /usr/share/fonts/*.ttf /usr/share/fonts/local/ > /dev/null
ln -s /usr/share/fonts/*.ttc /usr/share/fonts/local/ > /dev/null
ttmkfdir -e /usr/X11R6/lib/X11/fonts/encodings/encodings.dir -d /usr/share/fonts/local/ -o /usr/share/fonts/local/fonts.scale > /dev/null
cp -f /usr/share/fonts/local/fonts.scale /usr/share/fonts/local/fonts.dir > /dev/null
chkfontpath --add /usr/share/fonts/local/ > /dev/null
service xfs reload
echo "I'll change XFree86 config file: /etc/X11/XF86Config "
echo -n "Do you want to continue?(y/n)[y]"
read answer
echo " "
case $answer in
n*)
echo "You can run it again,Bye!"
exit 1
;;
*)
echo "OK,Let's go!"
;;
esac
patch -p0 /etc/X11/XF86Config < ~/hamigua/hamigua-XF86Config.patch > /dev/null
echo "Recomposing gtk1.0 setting file:/etc/gtk/gtkrc.zh_CN......"
cp -f /etc/gtk/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN.old > /dev/null
cp -f ~/hamigua/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN > /dev/null
cp -f /etc/fonts/fonts.conf /etc/fonts/fonts.conf.old > /dev/null
cp -f ~/hamigua/fonts.conf /etc/fonts/fonts.conf > /dev/null
echo "Recomposing xmms font option......"
cp -f ~/hamigua/xmms-config ~/.xmms/config > /dev/null
cd ~/
rm -rf ~/hamigua > /dev/null
echo "Install success!Good-bye!"
exit 0
hamigua-fontconfig.spec文件:
%define desktop_vendor hamigua
Summary:Chinese font Xft2 and gtk config for RedHat.
Name: hamigua-fontconfig
Version: 1.0
Release:2
License: GPL
Group: Applications
Source0:hamigua-font.tar.bz2
Source1:hamigua-fontconfig
BuildRoot: %{_tmppath}/%{name}-root
Requires: fontconfig, freetype, Xft
%description
Chinese font Xft2 and gtk config for RedHat.
Only RedHat Linux 8.0 or 9.0 release can run it!
hamigua <hamigua@8bb8.com> Jul 8 , 2003
http://www.linuxsir.cn/
%prep
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_prefix}/bin
mkdir -p %{buildroot}%{_datadir}
install -m 555 %{SOURCE1} %{buildroot}%{_prefix}/bin/
install -m 664 %{SOURCE0} %{buildroot}%{_datadir}/
%files
%{_prefix}/bin/hamigua-fontconfig
%{_datadir}/hamigua-font.tar.bz2
%changelog
* Fri Jul 11 2003 hamigua <hamigua@8bb8.com>
- Fix fontconfig
* Wed Jul 9 2003 hamigua <hamigua@8bb8.com>
- Build in HuNan |
|