From 3c85d588528bd8d4e553cd542370ff0e5516a76f Mon Sep 17 00:00:00 2001 From: windowsboy111 Date: Mon, 21 Nov 2022 21:07:13 +0800 Subject: [PATCH] Add hannom-fonts --- anda/fonts/hannom/COPYING | 7 ++ anda/fonts/hannom/anda.hcl | 6 ++ anda/fonts/hannom/hannom-fonts.spec | 108 ++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 anda/fonts/hannom/COPYING create mode 100644 anda/fonts/hannom/anda.hcl create mode 100644 anda/fonts/hannom/hannom-fonts.spec diff --git a/anda/fonts/hannom/COPYING b/anda/fonts/hannom/COPYING new file mode 100644 index 0000000000..7708774b73 --- /dev/null +++ b/anda/fonts/hannom/COPYING @@ -0,0 +1,7 @@ +Complete licensing information is embedded in the TTF files; most importantly: + + Chỉ được dùng riêng, tuyệt đối không được dùng để kinh doanh & vụ lợi + +Loose translation: + + For non-commercial, non-profit, personal use only. diff --git a/anda/fonts/hannom/anda.hcl b/anda/fonts/hannom/anda.hcl new file mode 100644 index 0000000000..2e977f01d3 --- /dev/null +++ b/anda/fonts/hannom/anda.hcl @@ -0,0 +1,6 @@ +project "pkg" { + rpm { + spec = "hannom-fonts.spec" + sources = "." + } +} diff --git a/anda/fonts/hannom/hannom-fonts.spec b/anda/fonts/hannom/hannom-fonts.spec new file mode 100644 index 0000000000..f25fdd57a5 --- /dev/null +++ b/anda/fonts/hannom/hannom-fonts.spec @@ -0,0 +1,108 @@ +Name: hannom-fonts +Version: 2005 +Release: %autorelease +URL: http://vietunicode.sourceforge.net/fonts/fonts_hannom.html +Source0: https://downloads.sourceforge.net/project/vietunicode/hannom/hannom%20v%{version}/hannomH.zip +Source1: COPYING +License: custom +Summary: Chinese and Vietnamese TrueType fonts +BuildRequires: unzip + +%description +%{summary}. + + +%prep +unzip %{SOURCE0} + + +%install +mkdir -p $RPM_BUILD_ROOT/%{prefix}/%{name}/ +cp -r *.ttf $RPM_BUILD_ROOT/%{prefix}/%{name}/ + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +{ + if test -x /sbin/conf.d/SuSEconfig.fonts ; then + # This is a SUSE system. Use proprietary SuSE tools... + if test "$YAST_IS_RUNNING" != "instsys" ; then + if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.fonts ; then + /sbin/SuSEconfig --module fonts + else + echo -e "\nERROR: SuSEconfig or requested SuSEconfig module not present!\n" ; exit 1 + fi + fi + + if test -x /sbin/conf.d/SuSEconfig.pango ; then + if test "$YAST_IS_RUNNING" != "instsys" ; then + if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.pango ; then + /sbin/SuSEconfig --module pango + else + echo -e "\nERROR: SuSEconfig or requested SuSEconfig module not present!\n" ; exit 1 + fi + fi + fi + else + # Use regular open standards methods... + ttmkfdir -d %{prefix}/%{name} \ + -o %{prefix}/%{name}/fonts.scale + umask 133 + /usr/X11R6/bin/mkfontdir %{prefix}/%{name} + /usr/sbin/chkfontpath -q -a %{prefix}/%{name} + [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache + fi +} &> /dev/null || : + + +%preun +{ + if [ "$1" = "0" ]; then + cd %{prefix}/%{name} + rm -f fonts.dir fonts.scale fonts.cache* + fi +} &> /dev/null || : + +%postun + +{ + if test -x /sbin/conf.d/SuSEconfig.fonts ; then + # This is a SUSE system. Use proprietary SuSE tools... + if test "$YAST_IS_RUNNING" != "instsys" ; then + if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.fonts ; then + /sbin/SuSEconfig --module fonts + else + echo -e "\nERROR: SuSEconfig or requested SuSEconfig module not present!\n" ; exit 1 + fi + fi + + if test -x /sbin/conf.d/SuSEconfig.pango ; then + if test "$YAST_IS_RUNNING" != "instsys" ; then + if test -x /sbin/SuSEconfig -a -f /sbin/conf.d/SuSEconfig.pango ; then + /sbin/SuSEconfig --module pango + else + echo -e "\nERROR: SuSEconfig or requested SuSEconfig module not present!\n" ; exit 1 + fi + fi + fi + else + # Use regular open standards methods... + if [ "$1" = "0" ]; then + /usr/sbin/chkfontpath -q -r %{prefix}/%{name} + fi + [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache + fi +} &> /dev/null || : + + +%files +# %license %{SOURCE1} +%defattr(-,root,root,0755) +/%{prefix}/%{name} + +%changelog +* Mon Nov 21 2022 windowsboy111 - 4.004 +- Initial package