Update to satisfy CI run
This commit is contained in:
parent
6ec5a09169
commit
79d11472c9
@ -1,6 +1,6 @@
|
|||||||
|
%global cionly 0
|
||||||
|
|
||||||
%global _fontname google-noto
|
%global _fontname google-noto
|
||||||
%global _fontnamevf google-noto-vf
|
|
||||||
%global _fontvfdir %{_fontbasedir}/%{_fontnamevf}
|
|
||||||
%global fontname %{_fontname}
|
%global fontname %{_fontname}
|
||||||
%global fontconf %{_fontname}
|
%global fontconf %{_fontname}
|
||||||
%global common_desc Noto fonts aims to remove tofu from web by providing fonts for all \
|
%global common_desc Noto fonts aims to remove tofu from web by providing fonts for all \
|
||||||
@ -20,8 +20,7 @@ Release: 1%{?dist}
|
|||||||
Summary: Hinted and Non Hinted OpenType fonts for Unicode scripts
|
Summary: Hinted and Non Hinted OpenType fonts for Unicode scripts
|
||||||
License: OFL
|
License: OFL
|
||||||
URL: https://github.com/googlefonts/noto-fonts/
|
URL: https://github.com/googlefonts/noto-fonts/
|
||||||
#Source0: https://github.com/googlefonts/noto-fonts/archive/v20201206-phase3.tar.gz
|
Source0: https://github.com/googlefonts/noto-fonts/archive/v20201206-phase3.tar.gz#/noto-fonts-%{srcver}.tar.gz
|
||||||
Source0: noto-fonts-%{srcver}.tar.gz
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: fontpackages-devel
|
BuildRequires: fontpackages-devel
|
||||||
@ -87,7 +86,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", family="Sans Cherokee", lang={ "chr" } },
|
{ alias="sans-serif", family="Sans Cherokee", lang={ "chr" } },
|
||||||
{ alias="sans-serif", family="Sans Coptic", lang={ "cop" } },
|
{ alias="sans-serif", family="Sans Coptic", lang={ "cop" } },
|
||||||
{ alias="sans-serif", family="Sans Cuneiform", lang={ "slv" } },
|
{ alias="sans-serif", family="Sans Cuneiform", lang={ "slv" } },
|
||||||
{ alias="sans-serif", family="Sans Cypriot", lang={ "cy" } },
|
{ alias="sans-serif", family="Sans Cypriot" },
|
||||||
{ alias="sans-serif", family="Sans Deseret" },
|
{ alias="sans-serif", family="Sans Deseret" },
|
||||||
{ alias="sans-serif", family="Sans Devanagari", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" } },
|
{ alias="sans-serif", family="Sans Devanagari", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" } },
|
||||||
{ alias="sans-serif", family="Sans Devanagari UI", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" },
|
{ alias="sans-serif", family="Sans Devanagari UI", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" },
|
||||||
@ -123,7 +122,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", family="Sans Indic Siyaq Numbers" },
|
{ alias="sans-serif", family="Sans Indic Siyaq Numbers" },
|
||||||
{ alias="sans-serif", family="Sans Inscriptional Pahlavi" },
|
{ alias="sans-serif", family="Sans Inscriptional Pahlavi" },
|
||||||
{ alias="sans-serif", family="Sans Inscriptional Parthian" },
|
{ alias="sans-serif", family="Sans Inscriptional Parthian" },
|
||||||
{ alias="sans-serif", family="Sans Javanese", lang={ "jv" } },
|
{ alias="sans-serif", family="Sans Javanese" },
|
||||||
{ alias="sans-serif", family="Sans Kaithi" },
|
{ alias="sans-serif", family="Sans Kaithi" },
|
||||||
{ alias="sans-serif", family="Sans Kannada", lang={ "kn" } },
|
{ alias="sans-serif", family="Sans Kannada", lang={ "kn" } },
|
||||||
{ alias="sans-serif", family="Sans Kannada UI", lang={ "kn" },
|
{ alias="sans-serif", family="Sans Kannada UI", lang={ "kn" },
|
||||||
@ -164,7 +163,7 @@ local subpackages = {
|
|||||||
priority=rpm.expand('%{lprio}')
|
priority=rpm.expand('%{lprio}')
|
||||||
},
|
},
|
||||||
{ alias="sans-serif", family="Sans Mayan Numerals" },
|
{ alias="sans-serif", family="Sans Mayan Numerals" },
|
||||||
{ alias="sans-serif", family="Sans Meetei Mayek", lang={ "mni" },
|
{ alias="sans-serif", family="Sans Meetei Mayek",
|
||||||
obsolete="sans-meeteimayek"
|
obsolete="sans-meeteimayek"
|
||||||
},
|
},
|
||||||
{ alias="sans-serif", family="Sans Medefaidrin" },
|
{ alias="sans-serif", family="Sans Medefaidrin" },
|
||||||
@ -188,7 +187,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", family="Sans NKo", lang={ "nqo" } },
|
{ alias="sans-serif", family="Sans NKo", lang={ "nqo" } },
|
||||||
{ alias="sans-serif", family="Sans Nushu" },
|
{ alias="sans-serif", family="Sans Nushu" },
|
||||||
{ alias="sans-serif", family="Sans Ogham", lang={ "pgl" } },
|
{ alias="sans-serif", family="Sans Ogham", lang={ "pgl" } },
|
||||||
{ alias="sans-serif", family="Sans Ol Chiki", lang={ "sat" } },
|
{ alias="sans-serif", family="Sans Ol Chiki" },
|
||||||
{ alias="sans-serif", family="Sans Old Hungarian" },
|
{ alias="sans-serif", family="Sans Old Hungarian" },
|
||||||
{ alias="sans-serif", family="Sans Old Italic" },
|
{ alias="sans-serif", family="Sans Old Italic" },
|
||||||
{ alias="sans-serif", family="Sans Old North Arabian" },
|
{ alias="sans-serif", family="Sans Old North Arabian" },
|
||||||
@ -224,21 +223,23 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", family="Sans Sogdian" },
|
{ alias="sans-serif", family="Sans Sogdian" },
|
||||||
{ alias="sans-serif", family="Sans Sora Sompeng" },
|
{ alias="sans-serif", family="Sans Sora Sompeng" },
|
||||||
{ alias="sans-serif", family="Sans Soyombo" },
|
{ alias="sans-serif", family="Sans Soyombo" },
|
||||||
{ alias="sans-serif", family="Sans Sundanese", lang={ "su" } },
|
{ alias="sans-serif", family="Sans Sundanese" },
|
||||||
{ alias="sans-serif", family="Sans Syloti Nagri" },
|
{ alias="sans-serif", family="Sans Syloti Nagri" },
|
||||||
|
|
||||||
{ alias="fantasy", family="Sans Symbols" },
|
{ alias="fantasy", family="Sans Symbols" },
|
||||||
{ alias="fantasy", family="Sans Symbols2" },
|
{ alias="fantasy", family="Sans Symbols2" },
|
||||||
|
|
||||||
{ alias="sans-serif", family="Sans Syriac", lang={ "syr" } },
|
{ alias="sans-serif", family="Sans Syriac", lang={ "syr" } },
|
||||||
{ alias="sans-serif", family="Sans Tagalog", lang={ "tl" } },
|
{ alias="sans-serif", family="Sans Tagalog" },
|
||||||
{ alias="sans-serif", family="Sans Tagbanwa", lang={ "twb" } },
|
{ alias="sans-serif", family="Sans Tagbanwa", lang={ "twb" } },
|
||||||
{ alias="sans-serif", family="Sans Takri" },
|
{ alias="sans-serif", family="Sans Takri" },
|
||||||
{ alias="sans-serif", family="Sans Tai Le" },
|
{ alias="sans-serif", family="Sans Tai Le" },
|
||||||
{ alias="sans-serif", family="Sans Tai Tham" },
|
{ alias="sans-serif", family="Sans Tai Tham" },
|
||||||
{ alias="sans-serif", family="Sans Tai Viet" },
|
{ alias="sans-serif", family="Sans Tai Viet" },
|
||||||
{ alias="sans-serif", family="Sans Tamil", lang={ "ta" } },
|
{ alias="sans-serif", family="Sans Tamil", lang={ "ta" } },
|
||||||
{ alias="sans-serif", family="Sans Tamil Supplement", lang={ "ta" } },
|
{ alias="sans-serif", family="Sans Tamil Supplement", lang={ "ta" },
|
||||||
|
excludeci=true
|
||||||
|
},
|
||||||
{ alias="sans-serif", family="Sans Tamil UI", lang={ "ta" },
|
{ alias="sans-serif", family="Sans Tamil UI", lang={ "ta" },
|
||||||
priority=rpm.expand('%{lprio}')
|
priority=rpm.expand('%{lprio}')
|
||||||
},
|
},
|
||||||
@ -337,7 +338,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", variable=true, family="Sans Cham", lang={ "cjm" } },
|
{ alias="sans-serif", variable=true, family="Sans Cham", lang={ "cjm" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Cherokee", lang={ "chr" } },
|
{ alias="sans-serif", variable=true, family="Sans Cherokee", lang={ "chr" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Cuneiform", lang={ "slv" } },
|
{ alias="sans-serif", variable=true, family="Sans Cuneiform", lang={ "slv" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Cypriot", lang={ "cy" } },
|
{ alias="sans-serif", variable=true, family="Sans Cypriot" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Deseret" },
|
{ alias="sans-serif", variable=true, family="Sans Deseret" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Devanagari", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" } },
|
{ alias="sans-serif", variable=true, family="Sans Devanagari", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Devanagari UI", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" },
|
{ alias="sans-serif", variable=true, family="Sans Devanagari UI", lang={ "bh", "bho", "brx", "doi", "hi", "hne", "kok", "ks@devanagari", "mai", "mr", "ne", "sa", "sat", "sd@devanagari" },
|
||||||
@ -387,7 +388,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", variable=true, family="Sans Math" },
|
{ alias="sans-serif", variable=true, family="Sans Math" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Mayan Numerals" },
|
{ alias="sans-serif", variable=true, family="Sans Mayan Numerals" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Medefaidrin" },
|
{ alias="sans-serif", variable=true, family="Sans Medefaidrin" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans MeeteiMayek", lang={ "mni" } },
|
{ alias="sans-serif", variable=true, family="Sans MeeteiMayek" },
|
||||||
{ alias="monospace", variable=true, family="Sans Mono" },
|
{ alias="monospace", variable=true, family="Sans Mono" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Mro" },
|
{ alias="sans-serif", variable=true, family="Sans Mro" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Multani" },
|
{ alias="sans-serif", variable=true, family="Sans Multani" },
|
||||||
@ -398,7 +399,7 @@ local subpackages = {
|
|||||||
{ alias="sans-serif", variable=true, family="Sans Nabataean" },
|
{ alias="sans-serif", variable=true, family="Sans Nabataean" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans New Tai Lue", lang={ "khb" } },
|
{ alias="sans-serif", variable=true, family="Sans New Tai Lue", lang={ "khb" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Ogham", lang={ "pgl" } },
|
{ alias="sans-serif", variable=true, family="Sans Ogham", lang={ "pgl" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Ol Chiki", lang={ "sat" } },
|
{ alias="sans-serif", variable=true, family="Sans Ol Chiki" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Osmanya" },
|
{ alias="sans-serif", variable=true, family="Sans Osmanya" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Phoenician" },
|
{ alias="sans-serif", variable=true, family="Sans Phoenician" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Runic", lang={ "gem" } },
|
{ alias="sans-serif", variable=true, family="Sans Runic", lang={ "gem" } },
|
||||||
@ -411,13 +412,15 @@ local subpackages = {
|
|||||||
},
|
},
|
||||||
{ alias="sans-serif", variable=true, family="Sans Sora Sompeng" },
|
{ alias="sans-serif", variable=true, family="Sans Sora Sompeng" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Soyombo" },
|
{ alias="sans-serif", variable=true, family="Sans Soyombo" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Sundanese", lang={ "su" } },
|
{ alias="sans-serif", variable=true, family="Sans Sundanese" },
|
||||||
{ alias="fantasy", variable=true, family="Sans Symbols" },
|
{ alias="fantasy", variable=true, family="Sans Symbols" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Tagbanwa", lang={ "twb" } },
|
{ alias="sans-serif", variable=true, family="Sans Tagbanwa", lang={ "twb" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Tai Tham" },
|
{ alias="sans-serif", variable=true, family="Sans Tai Tham" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Takri" },
|
{ alias="sans-serif", variable=true, family="Sans Takri" },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Tamil", lang={ "ta" } },
|
{ alias="sans-serif", variable=true, family="Sans Tamil", lang={ "ta" } },
|
||||||
{ alias="sans-serif", variable=true, family="Sans Tamil Supplement", lang={ "ta" } },
|
{ alias="sans-serif", variable=true, family="Sans Tamil Supplement", lang={ "ta" },
|
||||||
|
excludeci=true
|
||||||
|
},
|
||||||
{ alias="sans-serif", variable=true, family="Sans Tamil UI", lang={ "ta" },
|
{ alias="sans-serif", variable=true, family="Sans Tamil UI", lang={ "ta" },
|
||||||
priority=rpm.expand('%{lprio}')
|
priority=rpm.expand('%{lprio}')
|
||||||
},
|
},
|
||||||
@ -513,8 +516,8 @@ end
|
|||||||
|
|
||||||
local function genmetainfo(table)
|
local function genmetainfo(table)
|
||||||
local fonts = require "fedora.rpm.fonts"
|
local fonts = require "fedora.rpm.fonts"
|
||||||
local xmlfontname = '$(cmd=$(for f in %{buildroot}' .. table.filename .. '; do fc-scan "$f" -f "echo \\\\\" <font>%{fullname[0]}</font>\\\\\";"; done|grep -v "font></font"); if test x"$cmd" != x; then sh -c "echo \\\\\" <provides>\\\\\"; $cmd echo \\\\\" </provides>\\\\\""; fi)'
|
local xmlfontname = '$(cmd=$(for f in %{buildroot}' .. table.filename .. '; do fc-scan "$f" -f "echo \\\\\" <font>%{fullname[0]}</font>\\\\\";"; done); if test x"$cmd" != x; then echo "echo \\\\\" <provides>\\\\\"; $cmd echo \\\\\" </provides>\\\\\""|sh; fi|grep -v "font></font")'
|
||||||
local xmlfontlang = '$(cmd=$(for f in %{buildroot}' .. table.filename .. '; do fc-scan "$f" -f "%{[]lang{echo \\\\\" <lang>%{lang}</lang>\\\\\";}}"; done); if test x"$cmd" != x; then sh -c "echo \\\\\" <languages>\\\\\"; ($cmd)|sort -u; echo \\\\\" </languages>\\\\\""; fi)'
|
local xmlfontlang = '$(cmd=$(for f in %{buildroot}' .. table.filename .. '; do fc-scan "$f" -f "%{[]lang{echo \\\\\" <lang>%{lang}</lang>\\\\\";}}"; done); if test x"$cmd" != x; then echo "echo \\\\\" <languages>\\\\\"; ($cmd)|sort -u; echo \\\\\" </languages>\\\\\""|sh; fi)'
|
||||||
local xml = [[
|
local xml = [[
|
||||||
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
|
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
|
||||||
<!-- $PDX-License-Identifier: MIT -->\
|
<!-- $PDX-License-Identifier: MIT -->\
|
||||||
@ -533,7 +536,94 @@ local function genmetainfo(table)
|
|||||||
<release version=\"]] .. rpm.expand("%{version}") .. [[\" date=\"$(date -d @$SOURCE_DATE_EPOCH -u --rfc-3339=d)\"/>\
|
<release version=\"]] .. rpm.expand("%{version}") .. [[\" date=\"$(date -d @$SOURCE_DATE_EPOCH -u --rfc-3339=d)\"/>\
|
||||||
</releases>]] .. "\\\n" .. xmlfontname .. "\\\n" .. xmlfontlang .. "\\\n" .. [[
|
</releases>]] .. "\\\n" .. xmlfontname .. "\\\n" .. xmlfontlang .. "\\\n" .. [[
|
||||||
</component>\]]
|
</component>\]]
|
||||||
_metainfobuild = (_metainfobuild ~= '' and _metainfobuild .. "\n" or '') .. "cat<<_EOL_>" .. table.metainfo .. "\\\n" .. xml .. "\n_EOL_\\"
|
_metainfobuild = (_metainfobuild ~= '' and _metainfobuild .. "\n" or '') .. "cat<<_EOL_>" .. table.metainfo .. "\\\n" .. xml .. "\n_EOL_\\\nif ! grep provides " .. table.metainfo .. " > /dev/null 2>&1; then echo \"" .. table.pkgname .. ": No family names provided\"; exit 1; fi\\"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function has_value(table, value)
|
||||||
|
for _,v in ipairs(table) do
|
||||||
|
if v == value then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local function gentestyaml()
|
||||||
|
local fcorth = { "aa","ab","af","ak","am","an","ar","as","ast","av","ay","az_az","az_ir","ba","be","ber_dz","ber_ma","bg","bh","bho","bi","bin","bm","bn","bo","br","brx","bs","bua","byn","ca","ce","ch","chm","chr","co","crh","cs","csb","cu","cv","cy","da","de","doi","dv","dz","ee","el","en","eo","es","et","eu","fa","fat","ff","fi","fil","fj","fo","fr","fur","fy","ga","gd","gez","gl","gn","gu","gv","ha","haw","he","hi","hne","ho","hr","hsb","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kaa","kab","ki","kj","kk","kl","km","kn","ko","kok","kr","ks","ku_am","ku_iq","ku_ir","ku_tr","kum","kv","kw","kwm","ky","la","lah","lb","lez","lg","li","ln","lo","lt","lv","mai","mg","mh","mi","mk","ml","mn_cn","mn_mn","mni","mo","mr","ms","mt","my","na","nb","nds","ne","ng","nl","nn","no","nqo","nr","nso","nv","ny","oc","om","or","os","ota","pa","pa_pk","pap_an","pap_aw","pes","pl","prs","ps_af","ps_pk","pt","qu","quz","rm","rn","ro","ru","rw","sa","sah","sat","sc","sco","sd","se","sel","sg","sh","shs","si","sid","sk","sl","sm","sma","smj","smn","sms","sn","so","sq","sr","ss","st","su","sv","sw","syr","szl","ta","te","tg","th","ti_er","ti_et","tig","tk","tl","tn","to","tr","ts","tt","tw","ty","tyv","ug","uk","und_zmth","und_zsye","ur","uz","ve","vi","vo","vot","wa","wal","wen","wo","xh","yap","yi","yo","za","zh_cn","zh_hk","zh_mo","zh_sg","zh_tw","zu" }
|
||||||
|
local yaml = [[
|
||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: custom-test-fonts
|
||||||
|
required_packages:
|
||||||
|
]]
|
||||||
|
local langs = {}
|
||||||
|
local hash = {}
|
||||||
|
local files = {}
|
||||||
|
local exfiles = {}
|
||||||
|
for i = 1, #subpackages do
|
||||||
|
if subpackages[i]["lang"] ~= nil then
|
||||||
|
for _,v in ipairs(subpackages[i].lang) do
|
||||||
|
-- local f = has_value(fcorth, v)
|
||||||
|
local f = true
|
||||||
|
local fname = string.gsub(subpackages[i].filename, "(.*/)(.*)", "%2")
|
||||||
|
if f and (not hash[v]) then
|
||||||
|
langs[#langs+1] = v
|
||||||
|
hash[v] = true
|
||||||
|
files[v] = {}
|
||||||
|
exfiles[v] = {}
|
||||||
|
elseif (not f) then
|
||||||
|
io.stderr:write("WARNING: " .. fname .. ": " .. v .. " isn't supported in fontconfig\n")
|
||||||
|
end
|
||||||
|
if files[v] ~= nil then
|
||||||
|
if subpackages[i]["excludeci"] ~= nil then
|
||||||
|
exfiles[v][#exfiles[v]+1] = fname
|
||||||
|
else
|
||||||
|
files[v][#files[v]+1] = fname
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
yaml = yaml .. " - " .. subpackages[i].pkgname .. "\n"
|
||||||
|
end
|
||||||
|
yaml = yaml .. " coverage:\n"
|
||||||
|
for i = 1, #langs do
|
||||||
|
local f = has_value(fcorth, langs[i])
|
||||||
|
if f then
|
||||||
|
yaml = yaml .. " " .. langs[i] .. [[:
|
||||||
|
path_prefix:
|
||||||
|
- /usr/share/fonts/google-noto-vf
|
||||||
|
- /usr/share/fonts/google-noto
|
||||||
|
include:]] .. "\n"
|
||||||
|
for j = 1, #files[langs[i]] do
|
||||||
|
yaml = yaml .. " - " .. files[langs[i]][j] .. "\n"
|
||||||
|
end
|
||||||
|
if next(exfiles[langs[i]]) ~= nil then
|
||||||
|
yaml = yaml .. [[
|
||||||
|
exclude:]] .. "\n"
|
||||||
|
for j = 1, #exfiles[langs[i]] do
|
||||||
|
yaml = yaml .. " - " .. exfiles[langs[i]][j] .. "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
yaml = yaml .. " families:\n"
|
||||||
|
for i = 1, #subpackages do
|
||||||
|
if subpackages[i].lang then
|
||||||
|
for _,v in ipairs(subpackages[i].lang) do
|
||||||
|
yaml = yaml .. " - lang: " .. v .. "\n" .. [[
|
||||||
|
package: ]] .. subpackages[i].pkgname .. "\n" .. [[
|
||||||
|
alias: ]] .. subpackages[i].alias .. "\n" .. [[
|
||||||
|
family: Noto ]] .. subpackages[i].family .. "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
io.stderr:write("Generating tests.yml...")
|
||||||
|
local f = io.open("tests/tests.yml", "w")
|
||||||
|
f:write(yaml)
|
||||||
|
f:close()
|
||||||
|
io.stderr:write("Done!")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function notopkg(table)
|
local function notopkg(table)
|
||||||
@ -543,7 +633,7 @@ local function notopkg(table)
|
|||||||
local prio = tostring((table.priority and table.priority or (table.variable and rpm.expand('%{hprio}') or rpm.expand('%{mprio}'))))
|
local prio = tostring((table.priority and table.priority or (table.variable and rpm.expand('%{hprio}') or rpm.expand('%{mprio}'))))
|
||||||
local fcconf = prio .. '-' .. rpm.expand('%{fontconf}') .. '-' .. pname .. '.conf'
|
local fcconf = prio .. '-' .. rpm.expand('%{fontconf}') .. '-' .. pname .. '.conf'
|
||||||
local fontdir = rpm.expand('%{_fontbasedir}') .. '/google-noto' .. (table.variable and '-vf/' or '/')
|
local fontdir = rpm.expand('%{_fontbasedir}') .. '/google-noto' .. (table.variable and '-vf/' or '/')
|
||||||
local fontname = 'Noto' .. (table.fontname and table.fontname or string.gsub(table.family, ' ', '')) .. (table.variable and '-*VF.*tf' or '-*.*tf')
|
local fontname = 'Noto' .. (table.fontname and table.fontname or string.gsub(table.family, ' ', '')) .. (table.variable and '-*VF*.*tf' or '-[^VF]*.*tf')
|
||||||
local metaname = rpm.expand('%{fontorg}.') .. pkgname .. '.metainfo.xml'
|
local metaname = rpm.expand('%{fontorg}.') .. pkgname .. '.metainfo.xml'
|
||||||
|
|
||||||
table.fcconf = fcconf
|
table.fcconf = fcconf
|
||||||
@ -577,9 +667,18 @@ end
|
|||||||
|
|
||||||
for i = 1, #subpackages do
|
for i = 1, #subpackages do
|
||||||
notopkg(subpackages[i])
|
notopkg(subpackages[i])
|
||||||
|
if rpm.expand("%{cionly}") ~= 0 then
|
||||||
genfcconf(subpackages[i])
|
genfcconf(subpackages[i])
|
||||||
genmetainfo(subpackages[i])
|
genmetainfo(subpackages[i])
|
||||||
|
else
|
||||||
|
_fcconfbuild = "false"
|
||||||
|
_metainfobuild = "false"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
if rpm.expand("%{cionly}") then
|
||||||
|
gentestyaml()
|
||||||
|
end
|
||||||
|
|
||||||
rpm.define("noto_fcconflist " .. _fcconflist)
|
rpm.define("noto_fcconflist " .. _fcconflist)
|
||||||
rpm.define("noto_metafilelist " .. _metafilelist)
|
rpm.define("noto_metafilelist " .. _metafilelist)
|
||||||
local f = io.open("debug-noto-fcconf-build.sh", "w")
|
local f = io.open("debug-noto-fcconf-build.sh", "w")
|
||||||
@ -597,17 +696,18 @@ rpm.define("notobuild_metainfo " .. _metainfobuild .. "\n")
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{cionly}
|
||||||
|
exit 1
|
||||||
|
%endif
|
||||||
%{notobuild_fcconf}
|
%{notobuild_fcconf}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%global fontname %{_fontname}
|
install -m 0755 -d %{buildroot}%{_fontbasedir}/google-noto
|
||||||
install -m 0755 -d %{buildroot}%{_fontdir}
|
|
||||||
for f in unhinted/ttf/*/Noto*.ttf hinted/ttf/*/Noto*.ttf; do
|
for f in unhinted/ttf/*/Noto*.ttf hinted/ttf/*/Noto*.ttf; do
|
||||||
install -m 0644 -p $f %{buildroot}%{_fontdir}
|
install -m 0644 -p $f %{buildroot}%{_fontbasedir}/google-noto/
|
||||||
done
|
done
|
||||||
%global fontname %{_fontnamevf}
|
install -m 0755 -d %{buildroot}%{_fontbasedir}/google-noto-vf
|
||||||
install -m 0755 -d %{buildroot}%{_fontdir}
|
install -m 0644 -p unhinted/slim-variable-ttf/Noto*.ttf %{buildroot}%{_fontbasedir}/google-noto-vf/
|
||||||
install -m 0644 -p unhinted/slim-variable-ttf/Noto*.ttf %{buildroot}%{_fontdir}
|
|
||||||
|
|
||||||
# fc-scan in script expects fonts are already installed
|
# fc-scan in script expects fonts are already installed
|
||||||
%{notobuild_metainfo}
|
%{notobuild_metainfo}
|
||||||
|
@ -149,9 +149,9 @@ logfile="$(realpath "$logfile")"
|
|||||||
exec > >(tee -a "$logfile") 2>&1
|
exec > >(tee -a "$logfile") 2>&1
|
||||||
|
|
||||||
debug "Check family assignment"
|
debug "Check family assignment"
|
||||||
res=`FONTCONFIG_FILE=$tmpconfd/fonts.conf fc-match -f "%{family[0]}" :family=$OPT_ALIAS:lang=$OPT_LANG`
|
res=`FONTCONFIG_FILE=$tmpconfd/fonts.conf fc-pattern -c -f "%{family}" :family=$OPT_ALIAS:lang=$OPT_LANG|grep "$OPT_FAMILY"`
|
||||||
ret=0
|
ret=0
|
||||||
if [ "x$res" = "x$OPT_FAMILY" ]; then
|
if [ "x$res" != "x" ]; then
|
||||||
echo "RESULT: PASS: $OPT_FAMILY was assigned to $OPT_ALIAS as expected"
|
echo "RESULT: PASS: $OPT_FAMILY was assigned to $OPT_ALIAS as expected"
|
||||||
else
|
else
|
||||||
echo "RESULT: FAIL: $OPT_FAMILY wasn't assigned to $OPT_ALIAS (actual result: $res)"
|
echo "RESULT: FAIL: $OPT_FAMILY wasn't assigned to $OPT_ALIAS (actual result: $res)"
|
||||||
|
1635
tests/tests.yml
1635
tests/tests.yml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user