Add google-noto-sans-mono-cjk-vf-fonts sub package

This commit is contained in:
Peng Wu 2023-06-20 15:06:52 +08:00
parent 4e9b2d4e5a
commit 5a6e9f696f
2 changed files with 59 additions and 37 deletions

View File

@ -2,33 +2,20 @@
Epoch: 1
Version: 2.004
Release: 3%{?dist}
Release: 4%{?dist}
URL: https://github.com/googlefonts/noto-cjk
BuildRequires: python3
%global foundry Google
%global fontlicense OFL-1.1
%global fontlicenses LICENSE
%global fontfamily Noto Sans CJK VF
%global fontsummary Google Noto Sans CJK Variable Fonts
%global fonts *.ttc
%global fontconfs 65-0-%{fontpkgname}.conf %{SOURCE10} %{SOURCE11}
%global fontdescription %{expand:
%global common_description %{expand:
Noto CJK fonts, supporting Simplified Chinese, Traditional Chinese, \
Japanese, and Korean. The supported scripts are Han, Hiragana, Katakana, \
Hangul, and Bopomofo. Latin, Greek, Cyrllic, and various symbols are also \
supported for compatibility with CJK standards.
The google-noto-sans-cjk-vf-fonts package contains Google Noto Sans CJK Variable fonts.
}
Source0: https://github.com/googlefonts/noto-cjk/releases/download/Sans%{version}/01_NotoSansCJK-OTF-VF.zip
Source1: genfontconf.py
Source10: 65-%{fontpkgname}.conf
Source11: 65-google-noto-sans-cjk-mono-vf-fonts.conf
%global obsoletes_epoch_version_release 0:20201206-8
%global obsoletes_pkg()\
@ -36,12 +23,11 @@ Source11: 65-google-noto-sans-cjk-mono-vf-fonts.conf
Obsoletes: %{subpkgname} < %{obsoletes_epoch_version_release}\
Provides: %{subpkgname} = %{epoch}:%{version}-%{release}\
%global obsoletes_sans()\
%define langname %1\
%obsoletes_pkg google-noto-sans-cjk-%{langname}-fonts\
%obsoletes_pkg google-noto-sans-mono-cjk-%{langname}-fonts\
%global fontpkgheader %{expand:
%global fontfamily0 Noto Sans CJK VF
%global fontsummary0 Google Noto Sans CJK Variable Fonts
%global fontpkgheader0 %{expand:
Recommends: google-noto-sans-mono-cjk-vf-fonts = %{epoch}:%{version}-%{release}
# The Noto Sans CJK fonts have both Variable and non-Variable fonts.
# It will cause some issues if install both VF and non-VF fonts,
@ -52,16 +38,46 @@ Conflicts: google-noto-sans-cjk-fonts
%obsoletes_pkg google-noto-cjk-fonts-common
%obsoletes_pkg google-noto-sans-cjk-ttc-fonts
%obsoletes_sans sc
%obsoletes_sans tc
%obsoletes_sans hk
%obsoletes_sans jp
%obsoletes_sans kr
%obsoletes_pkg google-noto-sans-cjk-sc-fonts
%obsoletes_pkg google-noto-sans-cjk-tc-fonts
%obsoletes_pkg google-noto-sans-cjk-hk-fonts
%obsoletes_pkg google-noto-sans-cjk-jp-fonts
%obsoletes_pkg google-noto-sans-cjk-kr-fonts
}
%global fonts0 NotoSansCJK-VF.ttc
%global fontconfs0 %{SOURCE10} 65-0-%{fontpkgname0}.conf
%global fontdescription0 %{expand:
%{common_description}
The google-noto-sans-cjk-vf-fonts package contains Google Noto Sans CJK Variable fonts.}
%fontpkg
%global fontfamily1 Noto Sans Mono CJK VF
%global fontsummary1 Google Noto Sans Mono CJK Variable Fonts
%global fontpkgheader1 %{expand:
# The Noto Sans CJK fonts have both Variable and non-Variable fonts.
# It will cause some issues if install both VF and non-VF fonts,
# add Conflicts here to only install either VF or non-VF fonts.
Conflicts: google-noto-sans-cjk-fonts
%obsoletes_pkg google-noto-sans-mono-cjk-sc-fonts
%obsoletes_pkg google-noto-sans-mono-cjk-tc-fonts
%obsoletes_pkg google-noto-sans-mono-cjk-hk-fonts
%obsoletes_pkg google-noto-sans-mono-cjk-jp-fonts
%obsoletes_pkg google-noto-sans-mono-cjk-kr-fonts
}
%global fonts1 NotoSansMonoCJK-VF.ttc
%global fontconfs1 %{SOURCE11} 65-0-%{fontpkgname1}.conf
%global fontdescription1 %{expand:
%{common_description}
The google-noto-sans-mono-cjk-vf-fonts package contains Google Noto Sans Mono CJK Variable fonts.}
Source0: https://github.com/googlefonts/noto-cjk/releases/download/Sans%{version}/01_NotoSansCJK-OTF-VF.zip
Source1: genfontconf.py
Source10: 65-%{fontpkgname0}.conf
Source11: 65-%{fontpkgname1}.conf
%fontpkg -a
%prep
%autosetup -c
@ -71,31 +87,37 @@ cp -p Variable/OTC/NotoSansMonoCJK-VF.otf.ttc NotoSansMonoCJK-VF.ttc
cp %{SOURCE1} .
python3 genfontconf.py "ja" "monospace" "Noto Sans Mono CJK JP" \
"ja" "sans-serif" "Noto Sans CJK JP" \
"ko" "monospace" "Noto Sans Mono CJK KR" \
python3 genfontconf.py "ja" "sans-serif" "Noto Sans CJK JP" \
"ko" "sans-serif" "Noto Sans CJK KR" \
"zh-cn:zh-sg" "monospace" "Noto Sans Mono CJK SC" \
"zh-cn:zh-sg" "sans-serif" "Noto Sans CJK SC" \
"zh-tw:cmn:hak:lzh:nan" "monospace" "Noto Sans Mono CJK TC" \
"zh-tw:cmn:hak:lzh:nan" "sans-serif" "Noto Sans CJK TC" \
"zh-hk:zh-mo:yue" "monospace" "Noto Sans Mono CJK HK" \
"zh-hk:zh-mo:yue" "sans-serif" "Noto Sans CJK HK" \
| xmllint --format - |tee 65-0-google-noto-sans-cjk-vf-fonts.conf
python3 genfontconf.py "ja" "monospace" "Noto Sans Mono CJK JP" \
"ko" "monospace" "Noto Sans Mono CJK KR" \
"zh-cn:zh-sg" "monospace" "Noto Sans Mono CJK SC" \
"zh-tw:cmn:hak:lzh:nan" "monospace" "Noto Sans Mono CJK TC" \
"zh-hk:zh-mo:yue" "monospace" "Noto Sans Mono CJK HK" \
| xmllint --format - |tee 65-0-google-noto-sans-mono-cjk-vf-fonts.conf
%build
%fontbuild
%fontbuild -a
%install
%fontinstall
%fontinstall -a
%check
%fontcheck
%fontcheck -a
%fontfiles
%fontfiles -a
%changelog
* Wed Jul 26 2023 Peng Wu <pwu@redhat.com> - 1:2.004-4
- Add google-noto-sans-mono-cjk-vf-fonts sub package
- Resolves: RHBZ#2215475
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.004-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild