commit
7f657cb9f5
@ -0,0 +1 @@
|
||||
24c391f641a39c489f024909ab08715876e97333 SOURCES/fonts-rpm-macros-2.0.5.tar.gz
|
@ -0,0 +1 @@
|
||||
SOURCES/fonts-rpm-macros-2.0.5.tar.gz
|
@ -0,0 +1,46 @@
|
||||
diff -pruN fonts-rpm-macros-2.0.5.orig/bin/gen-fontconf fonts-rpm-macros-2.0.5/bin/gen-fontconf
|
||||
--- fonts-rpm-macros-2.0.5.orig/bin/gen-fontconf 2020-04-03 07:55:50.000000000 +0900
|
||||
+++ fonts-rpm-macros-2.0.5/bin/gen-fontconf 2024-06-03 14:07:58.244902559 +0900
|
||||
@@ -23,7 +23,11 @@ from lxml import etree
|
||||
from operator import itemgetter
|
||||
import os
|
||||
from pathlib import PurePath
|
||||
-import ruamel.yaml
|
||||
+yaml_supported = True
|
||||
+try:
|
||||
+ import ruamel.yaml
|
||||
+except ModuleNotFoundError:
|
||||
+ yaml_supported = False
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
@@ -36,14 +40,17 @@ oneormore = ['fullname', 'family', 'styl
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Generate traditional fontconfig syntax from a high-level configuration file')
|
||||
cgroup = parser.add_mutually_exclusive_group(required=True)
|
||||
-cgroup.add_argument("-y", "--yaml", "-c", "--config", type=str,
|
||||
- help="YAML configuration file to process")
|
||||
+mode = ['xml', 'legacy']
|
||||
+if yaml_supported:
|
||||
+ mode.append('yaml')
|
||||
+ cgroup.add_argument("-y", "--yaml", "-c", "--config", type=str,
|
||||
+ help="YAML configuration file to process")
|
||||
cgroup.add_argument("-x", "--xml", type=str,
|
||||
help="XML configuration file to process")
|
||||
parser.add_argument("-l", "--license", metavar="SPDX ID", type=str, nargs='?', default="MIT",
|
||||
help="SPDX license identifier for the generated files")
|
||||
parser.add_argument("-m", "--mode", metavar="MODE", type=str, nargs='?',
|
||||
- default="legacy", choices=['xml', 'yaml', 'legacy'],
|
||||
+ default="legacy", choices=mode,
|
||||
help="Output format: current fontconfig syntax, or XML/YAML syntax proposals")
|
||||
parser.add_argument("-w", "--write", action="store_true",
|
||||
help="Write output to disk")
|
||||
@@ -685,7 +692,7 @@ ext = '.conf'
|
||||
if args.mode == 'xml':
|
||||
ext = '.xml'
|
||||
|
||||
-if args.yaml != None:
|
||||
+if yaml_supported and args.yaml != None:
|
||||
groups = readyaml(args.yaml)
|
||||
if args.write and output == None:
|
||||
output = PurePath(PurePath(args.yaml).name).with_suffix(ext)
|
@ -0,0 +1,57 @@
|
||||
diff -pruN fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua
|
||||
--- fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua 2024-06-19 16:39:41.814323447 +0900
|
||||
+++ fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua 2024-06-19 16:42:07.095849192 +0900
|
||||
@@ -172,13 +172,31 @@ local function pkg(forcemain, forcesub,
|
||||
end
|
||||
end
|
||||
|
||||
+-- Output Requires(meta) line
|
||||
+local function output_requires(fontpkg)
|
||||
+ if tonumber(rpm.expand("0%{?epoch}")) == 0 then
|
||||
+ print(rpm.expand( "Requires(meta): " .. fontpkg .. " = %{version}-%{release}\n"))
|
||||
+ else
|
||||
+ print(rpm.expand( "Requires(meta): " .. fontpkg .. " = %{epoch}:%{version}-%{release}\n"))
|
||||
+ end
|
||||
+end
|
||||
+
|
||||
-- Create a font (sub)metapackage header
|
||||
local function metapkg(name, summary, description, suffixes)
|
||||
local fedora = require "fedora.common"
|
||||
local fontpkgs = fedora.getsuffixed("fontpkgname")
|
||||
+ local hsuffix
|
||||
if (name == "") then
|
||||
name, _ = string.gsub(rpm.expand("%{name}"), "-fonts$", "")
|
||||
name = name .. "-fonts-all"
|
||||
+ hsuffix = "all"
|
||||
+ else
|
||||
+ hsuffix = norm(name)
|
||||
+ end
|
||||
+ if (rpm.expand("%{?fontpkgheader" .. hsuffix .. "}") ~= "") then
|
||||
+ fedora.explicitset( "currentfontpkgheader", "%{fontpkgheader" .. hsuffix .. "}", false)
|
||||
+ else
|
||||
+ fedora.explicitunset( "currentfontpkgheader", false)
|
||||
end
|
||||
if (summary == "") then
|
||||
summary = "All the font packages, generated from %{name}"
|
||||
@@ -192,18 +210,19 @@ local function metapkg(name, summary, de
|
||||
"Summary: " .. summary .. "\n"))
|
||||
if (suffixes == "") then
|
||||
for _, fontpkg in pairs(fontpkgs) do
|
||||
- print(rpm.expand( "Requires(meta): " .. fontpkg .. " = %{version}-%{release}\n"))
|
||||
+ output_requires(fontpkg)
|
||||
end
|
||||
else
|
||||
for suffix in string.gmatch(rpm.expand(suffixes), "[^%s%p]+") do
|
||||
local fontpkg = fontpkgs[suffix]
|
||||
if (fontpkg ~= nil) then
|
||||
- print(rpm.expand("Requires(meta): " .. fontpkg .. " = %{version}-%{release}\n"))
|
||||
+ output_requires(fontpkg)
|
||||
end
|
||||
end
|
||||
end
|
||||
print(rpm.expand(
|
||||
"BuildArch: noarch\n" ..
|
||||
+ "%{?currentfontpkgheader}\n" ..
|
||||
"%description -n " .. name .. "\n" ..
|
||||
description .. "\n" ..
|
||||
"%files -n " .. name .. "\n\n"))
|
@ -0,0 +1,14 @@
|
||||
diff -pruN fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua
|
||||
--- fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua 2020-04-03 07:55:50.000000000 +0900
|
||||
+++ fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua 2022-07-29 18:57:38.183789875 +0900
|
||||
@@ -118,7 +118,9 @@ local function env(suffix, verbose, glob
|
||||
fedora.explicitunset("current" .. g, verbose)
|
||||
end
|
||||
end
|
||||
- local basename = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "} }%{fontfamily" .. suffix .. "}")
|
||||
+ local foundry = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "}}")
|
||||
+ local family = string.gsub(rpm.expand("%{fontfamily" .. suffix .. "}"), "^" .. foundry, "")
|
||||
+ local basename = foundry .. " " .. family
|
||||
fedora.safeset("fontpkgname" .. suffix, rpmname(basename), verbose)
|
||||
fedora.safeset("fonthumanname" .. suffix, basename, verbose)
|
||||
fedora.safeset("fontdir" .. suffix, "%{_fontbasedir}/%{fontpkgname" .. suffix .. "}", verbose)
|
@ -0,0 +1,267 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
%global forgeurl https://pagure.io/fonts-rpm-macros
|
||||
Epoch: 1
|
||||
Version: 2.0.5
|
||||
%forgemeta
|
||||
|
||||
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
|
||||
%global _spectemplatedir %{_datadir}/rpmdevtools/fedora
|
||||
%global _docdir_fmt %{name}
|
||||
%global ftcgtemplatedir %{_datadir}/fontconfig/templates
|
||||
|
||||
# Master definition that will be written to macro files
|
||||
%global _fontbasedir %{_datadir}/fonts
|
||||
%global _fontconfig_masterdir %{_sysconfdir}/fonts
|
||||
%global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
|
||||
%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Name: fonts-rpm-macros
|
||||
Release: 17%{?dist}
|
||||
Summary: Build-stage rpm automation for fonts packages
|
||||
|
||||
License: GPL-3.0-or-later
|
||||
URL: https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/
|
||||
Source: %{forgesource}
|
||||
Patch0: %{name}-omit-foundry-in-family.patch
|
||||
Patch1: %{name}-drop-yaml.patch
|
||||
Patch2: %{name}-epoch-in-req.patch
|
||||
|
||||
Requires: fonts-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: fonts-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
Provides: fontpackages-devel = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: fontpackages-devel < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
# Tooling dropped for now as no one was willing to maintain it
|
||||
Obsoletes: fontpackages-tools < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
Requires: fontconfig
|
||||
Requires: libappstream-glib
|
||||
Requires: uchardet
|
||||
|
||||
# For the experimental generator
|
||||
%if 0%{?fedora} || 0%{?rhel} < 10
|
||||
Requires: python3-ruamel-yaml
|
||||
%endif
|
||||
Requires: python3-lxml
|
||||
|
||||
%description
|
||||
This package provides build-stage rpm automation to simplify the creation of
|
||||
fonts packages.
|
||||
|
||||
It does not need to be included in the default build root: fonts-srpm-macros
|
||||
will pull it in for fonts packages only.
|
||||
|
||||
%package -n fonts-srpm-macros
|
||||
Summary: Source-stage rpm automation for fonts packages
|
||||
Requires: redhat-rpm-config
|
||||
# macros.forge and forge.lua were split into a separate package.
|
||||
# redhat-rpm-config pulls in forge-srpm-macros but better to explicitly Require
|
||||
# it.
|
||||
%if (0%{?fedora} >= 40 || 0%{?rhel} >= 10)
|
||||
Requires: forge-srpm-macros
|
||||
%endif
|
||||
|
||||
%description -n fonts-srpm-macros
|
||||
This package provides SRPM-stage rpm automation to simplify the creation of
|
||||
fonts packages.
|
||||
|
||||
It limits itself to the automation subset required to create fonts SRPM
|
||||
packages and needs to be included in the default build root.
|
||||
|
||||
The rest of the automation is provided by the fonts-rpm-macros package, that
|
||||
fonts-srpm-macros will pull in for fonts packages only.
|
||||
|
||||
%package -n fonts-filesystem
|
||||
Summary: Directories used by font packages
|
||||
License: MIT
|
||||
|
||||
Provides: fontpackages-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Obsoletes: fontpackages-filesystem < %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description -n fonts-filesystem
|
||||
This package contains the basic directory layout used by font packages,
|
||||
including the correct permissions for the directories.
|
||||
|
||||
%package -n fonts-rpm-templates
|
||||
Summary: Example fonts packages rpm spec templates
|
||||
License: MIT
|
||||
|
||||
Requires: fonts-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Supplements: fonts-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
|
||||
%description -n fonts-rpm-templates
|
||||
This package contains documented rpm spec templates showcasing how to use the
|
||||
macros provided by fonts-rpm-macros to create fonts packages.
|
||||
|
||||
%prep
|
||||
%forgesetup
|
||||
%writevars -f rpm/macros.d/macros.fonts-srpm _fontbasedir _fontconfig_masterdir _fontconfig_confdir _fontconfig_templatedir
|
||||
for template in templates/rpm/*\.spec ; do
|
||||
target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g")
|
||||
grep -v '^%%dnl' "${template}" > "${target}"
|
||||
touch -r "${template}" "${target}"
|
||||
done
|
||||
%patch -P0 -p1
|
||||
%if 0%{?rhel} >= 10
|
||||
%patch -P1 -p1
|
||||
%endif
|
||||
%patch -P2 -p1
|
||||
|
||||
%install
|
||||
install -m 0755 -d %{buildroot}%{_fontbasedir} \
|
||||
%{buildroot}%{_fontconfig_masterdir} \
|
||||
%{buildroot}%{_fontconfig_confdir} \
|
||||
%{buildroot}%{_fontconfig_templatedir}
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_spectemplatedir}
|
||||
install -m 0644 -vp templates/rpm/*spec \
|
||||
%{buildroot}%{_spectemplatedir}
|
||||
install -m 0755 -vd %{buildroot}%{ftcgtemplatedir}
|
||||
install -m 0644 -vp templates/fontconfig/*{conf,txt} \
|
||||
%{buildroot}%{ftcgtemplatedir}
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{rpmmacrodir}
|
||||
install -m 0644 -vp rpm/macros.d/macros.fonts-* \
|
||||
%{buildroot}%{rpmmacrodir}
|
||||
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/srpm
|
||||
install -m 0644 -vp rpm/lua/srpm/*lua \
|
||||
%{buildroot}%{_rpmluadir}/fedora/srpm
|
||||
install -m 0755 -vd %{buildroot}%{_rpmluadir}/fedora/rpm
|
||||
install -m 0644 -vp rpm/lua/rpm/*lua \
|
||||
%{buildroot}%{_rpmluadir}/fedora/rpm
|
||||
|
||||
install -m 0755 -vd %{buildroot}%{_bindir}
|
||||
install -m 0755 -vp bin/* %{buildroot}%{_bindir}
|
||||
|
||||
%files
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/fc-weight
|
||||
%{_bindir}/gen-fontconf
|
||||
%{rpmmacrodir}/macros.fonts-rpm*
|
||||
%{_rpmluadir}/fedora/rpm/*.lua
|
||||
|
||||
%files -n fonts-srpm-macros
|
||||
%license LICENSE.txt
|
||||
%doc *.md changelog.txt
|
||||
%{rpmmacrodir}/macros.fonts-srpm*
|
||||
%{_rpmluadir}/fedora/srpm/*.lua
|
||||
|
||||
%files -n fonts-filesystem
|
||||
%dir %{_datadir}/fontconfig
|
||||
%dir %{_fontbasedir}
|
||||
%dir %{_fontconfig_masterdir}
|
||||
%dir %{_fontconfig_confdir}
|
||||
%dir %{_fontconfig_templatedir}
|
||||
|
||||
%files -n fonts-rpm-templates
|
||||
%license LICENSE-templates.txt
|
||||
%doc *.md changelog.txt
|
||||
%{_spectemplatedir}/*.spec
|
||||
%dir %{ftcgtemplatedir}
|
||||
%doc %{ftcgtemplatedir}/*conf
|
||||
%doc %{ftcgtemplatedir}/*txt
|
||||
|
||||
%changelog
|
||||
* Tue Aug 13 2024 Akira TAGOH <tagoh@redhat.com> - 1:2.0.5-17
|
||||
- Add exact binary name in the file list.
|
||||
- Do not package backup files.
|
||||
Resolves: RHEL-54049
|
||||
|
||||
* Wed Jun 19 2024 Akira TAGOH <tagoh@redhat.com> - 1:2.0.5-16
|
||||
- Add %%{epoch} in Requires line if needed
|
||||
- Support fontpkgheader macro for meta packages.
|
||||
|
||||
* Mon Jun 3 2024 Akira TAGOH <tagoh@redhat.com> - 1:2.0.5-15
|
||||
- Drop YAML support in gen-fontconf for RHEL10 or later.
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:2.0.5-15
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Dec 08 2022 Parag Nemade <pnemade AT redhat DOT com> - 1:2.0.5-10
|
||||
- Update license tag to SPDX format
|
||||
|
||||
* Fri Aug 19 2022 Akira TAGOH <tagoh@redhat.com> - 1:2.0.5-9
|
||||
- Omit foundry name in family name.
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat May 23 17:00:05 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1:2.0.5-3
|
||||
- Insert Epoch in Requires/Provides/Obsoletes
|
||||
|
||||
* Sat May 23 09:03:10 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1:2.0.5-2
|
||||
- Revert to 2.0.5
|
||||
|
||||
* Tue Apr 28 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 3.0.3-1
|
||||
🐞 Fix bugs in the 3.0.2 refactoring
|
||||
- 3.0.2-1
|
||||
🐞 Workaround Fedora problems created by rpm commit 93604e2
|
||||
harder
|
||||
|
||||
* Mon Apr 27 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 3.0.1-1
|
||||
🐞 Workaround Fedora problems created by rpm commit 93604e2
|
||||
|
||||
* Fri Apr 3 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.5-1
|
||||
✅ do not add empty urls to appstream files
|
||||
|
||||
* Thu Apr 2 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.4-2
|
||||
✅ validate fontconfig files by default
|
||||
|
||||
* Sat Feb 29 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.3-1
|
||||
✅ minor rpmlint-oriented fixlets
|
||||
|
||||
* Sat Feb 22 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.2-1
|
||||
✅ improve experimental fontconfig configuration generator
|
||||
|
||||
* Thu Feb 20 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.1-3
|
||||
✅ limit descriptions to 80 columns
|
||||
|
||||
* Fri Feb 14 2020 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.1-2
|
||||
✅ use fonts packaging guidelines as URL
|
||||
- 2.0.1-1
|
||||
✅ first 2.x version proposed to Fedora, after FPC approval
|
||||
https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2020-02-13/fpc.2020-02-13-17.00.txt
|
||||
|
||||
* Mon Nov 11 2019 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 2.0.0-1
|
||||
✅ transform into fonts-rpm-macros
|
||||
✅ major rpm macro and rpm spec template rework
|
||||
|
||||
|
||||
* Mon Nov 10 2008 Nicolas Mailhot <nim@fedoraproject.org>
|
||||
- 1.0-1
|
||||
✅ initial release
|
Loading…
Reference in new issue