# SPDX-License-Identifier: MIT Version: 20220807 Release: 1 URL: https://github.com/googlefonts/noto-cjk BuildRequires: python3 # The identifier of the entity, that released the font family. %global foundry Google # The font family license identifier. Adjust as necessary. The OFL is our # recommended font license. %global fontlicense OFL-1.1 # # The following directives are lists of space-separated shell globs # – matching files associated with the font family, # – as they exist in the build root, # — at the end of the %build stage: # – legal files (licensing…) %global fontlicenses LICENSE # – documentation files %global fontdocs *.txt # – exclusions from the ”fontdocs” list %global fontdocsex %{fontlicenses} # The human-friendly font family name, whitespace included, restricted to the # the Basic Latin Unicode block. %global fontfamily Noto CJK Sans VF %global fontsummary Google Noto Sans CJK Sans Variable Fonts # # More shell glob lists: # – font family files %global fonts Variable/OTC/*.otf.ttc # – fontconfig files %global fontconfs 65-0-%{fontpkgname}.conf %{SOURCE10} %{SOURCE11} # # A multi-line description block for the generated package. %global fontdescription %{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-cjk-sans-vf-fonts package contains Google Noto CJK Sans Variable fonts. } Source0: 01_NotoSansCJK-OTF-VF.zip Source1: genfontconf.py # Adjust as necessary. Keeping the filename in sync with the package name is a good idea. # See the fontconfig templates in fonts-rpm-templates for information on how to # write good fontconfig files and choose the correct priority [number]. Source10: 65-%{fontpkgname}.conf Source11: 65-google-noto-cjk-sans-mono-vf-fonts.conf %global obsoletes_version 20220320 %define obsoletes_pkg()\ %define subpkgname %1\ Obsoletes: %{subpkgname} < %{obsoletes_version}\ Provides: %{subpkgname} = %{obsoletes_version}\ %define obsoletes_sans()\ %define langname %1\ %obsoletes_pkg google-noto-sans-cjk-%{langname}-fonts\ %obsoletes_pkg google-noto-sans-%{langname}-fonts\ %obsoletes_pkg google-noto-sans-mono-cjk-%{langname}-fonts\ # A container for additional subpackage declarations. %global fontpkgheader %{expand: %obsoletes_pkg google-noto-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 } %fontpkg %prep %setup -c 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" \ "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-cjk-sans-vf-fonts.conf %build %fontbuild %install %fontinstall %check %fontcheck %fontfiles %changelog * Thu Dec 15 2022 Peng Wu - 20220807-1 - Initial Packaging - Migrate to SPDX license