Accepting request 982316 from home:Pi-Cla:branches:M17N:fonts

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/982316
OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/google-noto-fonts?expand=0&rev=51
This commit is contained in:
Takashi Iwai 2022-06-14 11:58:14 +00:00 committed by Git OBS Bridge
parent 36ff7a2290
commit 91d45acb8b
5 changed files with 254 additions and 270 deletions

View File

@ -2,9 +2,9 @@
pkg_name="google-noto-fonts" pkg_name="google-noto-fonts"
font_dir="ttf" 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 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 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 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') 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 elif [ $packagename == "noto-sans-mono" ]; then
OBSOLETES=($packagename 'noto-mono' 'noto-mono-fonts') OBSOLETES=($packagename 'noto-mono' 'noto-mono-fonts')
elif [ $packagename == "noto-arimo" ]; then elif [ $packagename == "noto-arimo" ] || [ $packagename == "noto-cousine" ] || [ $packagename == "noto-tinos" ]; then
OBSOLETES=($packagename 'google-arimo') OBSOLETES=($packagename `echo "google-$serif-fonts" | tr [A-Z] [a-z]`)
elif [ $packagename == "noto-cousine" ]; then
OBSOLETES=($packagename 'google-cousine')
elif [ $packagename == "noto-tinos" ]; then
OBSOLETES=($packagename 'google-tinos')
else else
OBSOLETES=($packagename) OBSOLETES=($packagename)
fi fi
@ -56,7 +52,6 @@ ls $font_dir/ | sed -e 's:Noto::' -e 's:-.*\..tf::' -e 's:\..tf::' -e 's:\.ttc::
sed -i "s/@SUBPACKAGE_HEADERS@/%package -n $packagename\n@SUBPACKAGE_HEADERS@/" $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@/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@;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 for i in "${OBSOLETES[@]}" ; do
sed -i "s/@SUBPACKAGE_HEADERS@/Obsoletes: $i < %{version}\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec 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 sed -i "s/@SUBPACKAGE_HEADERS@/Provides: $i = %{version}\n@SUBPACKAGE_HEADERS@/" $pkg_name.spec
@ -77,6 +72,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@/%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@/%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 sed -i "s/@SUBPACKAGE_FILELISTS@/%dir %{_ttfontsdir}\n@SUBPACKAGE_FILELISTS@/" $pkg_name.spec
if [ $serif == "Arimo" ] || [ $serif == "Cousine" ] || [ $serif == "Tinos" ]; then if [ $serif == "Arimo" ] || [ $serif == "Cousine" ] || [ $serif == "Tinos" ]; then
sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/$serif$script$ui-\*.?tf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec sed -i "s:@SUBPACKAGE_FILELISTS@:%{_ttfontsdir}/$serif$script$ui-\*.?tf\n@SUBPACKAGE_FILELISTS@:" $pkg_name.spec

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
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> Wed Jun 1 08:43:48 UTC 2022 - Bruno Pitrus <brunopitrus@hotmail.com>
- Add obsoletes and provides for google-{arimo,cousine,tinos}-fonts - 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 hyear 2022
%define hmonth 05 %define hmonth 06
%define hday 24 %define hday 07
%define src_name NotoFonts %define src_name NotoFonts
@ -43,13 +43,6 @@ BuildArch: noarch
Noto's design goal is to achieve visual harmonization (e.g., compatible heights and stroke Noto's design goal is to achieve visual harmonization (e.g., compatible heights and stroke
thicknesses) across languages. thicknesses) across languages.
%package doc
Summary: Noto Font Families License
Group: Documentation/Other
%description doc
License for Google's Noto fonts.
@SUBPACKAGE_HEADERS@ @SUBPACKAGE_HEADERS@
%prep %prep
tar -xzf %{SOURCE0} -C . tar -xzf %{SOURCE0} -C .
@ -58,7 +51,6 @@ cp %{SOURCE2} .
%build %build
%install %install
mkdir -p %{buildroot}%{_ttfontsdir}
# Tifinagh fonts have duplicates in NotoSansTifinagh folder # Tifinagh fonts have duplicates in NotoSansTifinagh folder
# https://github.com/googlefonts/noto-fonts/issues/2177 and https://github.com/googlefonts/noto-fonts/issues/2326 # https://github.com/googlefonts/noto-fonts/issues/2177 and https://github.com/googlefonts/noto-fonts/issues/2326
rm ttf/NotoSansTifinagh/NotoSansTifinagh[!\-]* rm ttf/NotoSansTifinagh/NotoSansTifinagh[!\-]*
@ -67,14 +59,8 @@ rm ttf/NotoSansTifinagh/NotoSansTifinagh[!\-]*
# Also they have inconsistent family names: https://github.com/googlefonts/noto-fonts/issues/2315 # Also they have inconsistent family names: https://github.com/googlefonts/noto-fonts/issues/2315
rm -r ttf/NotoSansDisplay/ rm -r ttf/NotoSansDisplay/
cp ttf/*/*.ttf %{buildroot}%{_ttfontsdir}/ install -Dm 644 -t %{buildroot}%{_ttfontsdir} ttf/*/*.ttf
@SUBPACKAGE_SCRIPTLETS@ @SUBPACKAGE_SCRIPTLETS@
%files doc
%defattr(0644,root,root,755)
%doc LICENSE
@SUBPACKAGE_FILELISTS@ @SUBPACKAGE_FILELISTS@
%changelog %changelog

View File

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