Accepting request 982913 from M17N:fonts

feat: create new metapackage noto-fonts with all Noto Fonts except CJK and Emoji
update: 20220524 -> 20220607
- Noto Sans and Noto Sans Myanmar have been updated
fix(spec): add LICENSE to every package, remove redundant doc package
- It is likely a legal requirement that the license must be included with the package (rather than only recommends)
- Using the %license macro and including the license in every subpackage is the norm
fix(sh): prevent redundant .svn files from being compressed into archive
chore(spec): use install instead of mkdir and cp
chore(sh): fix typo

OBS-URL: https://build.opensuse.org/request/show/982913
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/google-noto-fonts?expand=0&rev=24
This commit is contained in:
Dominique Leuenberger 2022-06-17 19:18:43 +00:00 committed by Git OBS Bridge
commit 648ccafe5b
5 changed files with 506 additions and 264 deletions

View File

@ -2,9 +2,9 @@
pkg_name="google-noto-fonts"
font_dir="ttf"
# Get only the otf fonts
# Get only the hinted fonts
svn checkout https://github.com/googlefonts/noto-fonts/trunk/hinted/$font_dir
tar -cvzf $font_dir.tar.gz $font_dir
tar -cvzf $font_dir.tar.gz $font_dir/[!\.]*
cp -f $pkg_name.spec.in $pkg_name.spec
ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::' | sort -f | uniq | while read font; do
@ -38,12 +38,8 @@ ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::
OBSOLETES=($packagename 'noto-sans-syriacwestern' 'noto-sans-syriacwestern-fonts' 'noto-sans-syriacestrangela' 'noto-sans-syriacestrangela-fonts' 'noto-sans-syriaceastern' 'noto-sans-syriaceastern-fonts')
elif [ $packagename == "noto-sans-mono" ]; then
OBSOLETES=($packagename 'noto-mono' 'noto-mono-fonts')
elif [ $packagename == "noto-arimo" ]; then
OBSOLETES=($packagename 'google-arimo')
elif [ $packagename == "noto-cousine" ]; then
OBSOLETES=($packagename 'google-cousine')
elif [ $packagename == "noto-tinos" ]; then
OBSOLETES=($packagename 'google-tinos')
elif [ $packagename == "noto-arimo" ] || [ $packagename == "noto-cousine" ] || [ $packagename == "noto-tinos" ]; then
OBSOLETES=($packagename `echo "google-$serif-fonts" | tr [A-Z] [a-z]`)
else
OBSOLETES=($packagename)
fi
@ -53,10 +49,10 @@ ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::
else
summary=`echo "Noto $serif Font" | sed 's:\([a-z]\)\([A-Z]\):\1 \2:g'`
fi
sed -i "s/@LIST_OF_SUBPACKAGES@/Requires: $packagename\n@LIST_OF_SUBPACKAGES@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_HEADERS@/%package -n $packagename\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_HEADERS@/Summary: $summary\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
sed -i "s;@SUBPACKAGE_HEADERS@;Group: System/X11/Fonts\n@SUBPACKAGE_HEADERS@;" $pkg_name.spec
sed -i "s/@SUBPACKAGE_HEADERS@/Recommends: $pkg_name-doc\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
for i in "${OBSOLETES[@]}" ; do
sed -i "s/@SUBPACKAGE_HEADERS@/Obsoletes: $i < %{version}\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_HEADERS@/Provides: $i = %{version}\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
@ -77,6 +73,7 @@ ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::
sed -i "s/@SUBPACKAGE_FILELISTS@/%files -n $packagename\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_FILELISTS@/%defattr(0644,root,root,755)\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_FILELISTS@/%license LICENSE\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
sed -i "s/@SUBPACKAGE_FILELISTS@/%dir %{_ttfontsdir}\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
if [ $serif == "Arimo" ] || [ $serif == "Cousine" ] || [ $serif == "Tinos" ]; then
sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/$serif$script$ui-\*.?tf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec
@ -86,7 +83,7 @@ ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::
sed -i "s/@SUBPACKAGE_FILELISTS@/\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
done
sed -i 's/@LIST_OF_SUBPACKAGES@//' $pkg_name.spec
sed -i 's/@SUBPACKAGE_HEADERS@//' $pkg_name.spec
sed -i 's/@SUBPACKAGE_SCRIPTLETS@//' $pkg_name.spec
sed -i 's/@SUBPACKAGE_FILELISTS@//' $pkg_name.spec

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Wed Jun 15 06:57:10 UTC 2022 - Gordon Leung <pirateclip@protonmail.com>
feat: create new metapackage noto-fonts with all Noto Fonts except CJK and Emoji
-------------------------------------------------------------------
Sun Jun 12 22:29:40 UTC 2022 - Gordon Leung <pirateclip@protonmail.com> - 20220607
update: 20220524 -> 20220607
- Noto Sans and Noto Sans Myanmar have been updated
fix(spec): add LICENSE to every package, remove redundant doc package
- It is likely a legal requirement that the license must be included with the package (rather than only recommends)
- Using the %license macro and including the license in every subpackage is the norm
fix(sh): prevent redundant .svn files from being compressed into archive
chore(spec): use install instead of mkdir and cp
chore(sh): fix typo
-------------------------------------------------------------------
Wed Jun 1 08:43:48 UTC 2022 - Bruno Pitrus <brunopitrus@hotmail.com>
- Add obsoletes and provides for google-{arimo,cousine,tinos}-fonts

File diff suppressed because it is too large Load Diff

View File

@ -17,8 +17,8 @@
%define hyear 2022
%define hmonth 05
%define hday 24
%define hmonth 06
%define hday 07
%define src_name NotoFonts
@ -30,7 +30,7 @@ Release: 0
Summary: Noto Font Families
License: OFL-1.1
Group: System/X11/Fonts
Url: https://github.com/googlefonts/noto-fonts
URL: https://github.com/googlefonts/noto-fonts
# Generate Source0 via generate-fonts-and-specfile.sh
Source0: ttf.tar.gz
Source1: generate-fonts-and-specfile.sh
@ -43,12 +43,16 @@ BuildArch: noarch
Noto's design goal is to achieve visual harmonization (e.g., compatible heights and stroke
thicknesses) across languages.
%package doc
Summary: Noto Font Families License
Group: Documentation/Other
%package -n noto-fonts
Summary: All Noto Fonts except CJK and Emoji
Group: System/X11/Fonts
@LIST_OF_SUBPACKAGES@
%description -n noto-fonts
Noto's design goal is to achieve visual harmonization (e.g., compatible
heights and stroke thicknesses) across languages. This package contains
most noto fonts except for CJK and Emoji.
%description doc
License for Google's Noto fonts.
@SUBPACKAGE_HEADERS@
%prep
@ -58,7 +62,6 @@ cp %{SOURCE2} .
%build
%install
mkdir -p %{buildroot}%{_ttfontsdir}
# Tifinagh fonts have duplicates in NotoSansTifinagh folder
# https://github.com/googlefonts/noto-fonts/issues/2177 and https://github.com/googlefonts/noto-fonts/issues/2326
rm ttf/NotoSansTifinagh/NotoSansTifinagh[!\-]*
@ -67,14 +70,12 @@ rm ttf/NotoSansTifinagh/NotoSansTifinagh[!\-]*
# Also they have inconsistent family names: https://github.com/googlefonts/noto-fonts/issues/2315
rm -r ttf/NotoSansDisplay/
cp ttf/*/*.ttf %{buildroot}%{_ttfontsdir}/
install -Dm 644 -t %{buildroot}%{_ttfontsdir} ttf/*/*.ttf
@SUBPACKAGE_SCRIPTLETS@
%files doc
%files -n noto-fonts
%defattr(0644,root,root,755)
%doc LICENSE
%license LICENSE
@SUBPACKAGE_FILELISTS@
%changelog

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8304dc403dcabc41b2f8619b0169cb05f524f6529dfd9bafe5c4854b4cb30f35
size 472361436
oid sha256:a3aa32d41e5d2f3f647881cc1e200d62becd8c0d3f86e88f5b4e0ae7471ad569
size 247038182