Blame SPECS/fonts-rpm-macros.spec

a98ca7
# SPDX-License-Identifier: MIT
a98ca7
%global forgeurl https://pagure.io/fonts-rpm-macros
a98ca7
Epoch: 1
a98ca7
Version: 2.0.5
a98ca7
%forgemeta
a98ca7
a98ca7
#https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/51
a98ca7
%global _spectemplatedir %{_datadir}/rpmdevtools/fedora
a98ca7
%global _docdir_fmt     %{name}
a98ca7
%global ftcgtemplatedir %{_datadir}/fontconfig/templates
a98ca7
a98ca7
# Master definition that will be written to macro files
a98ca7
%global _fontbasedir            %{_datadir}/fonts
a98ca7
%global _fontconfig_masterdir   %{_sysconfdir}/fonts
a98ca7
%global _fontconfig_confdir     %{_sysconfdir}/fonts/conf.d
a98ca7
%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
a98ca7
a98ca7
BuildArch: noarch
a98ca7
a98ca7
Name:      fonts-rpm-macros
a98ca7
Release:   7%{?dist}.1
a98ca7
Summary:   Build-stage rpm automation for fonts packages
a98ca7
a98ca7
License:   GPLv3+
a98ca7
URL:       https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/
a98ca7
Source:    %{forgesource}
a98ca7
a98ca7
Requires:  fonts-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
Requires:  fonts-filesystem  = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
a98ca7
Provides:  fontpackages-devel = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
Obsoletes: fontpackages-devel < %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
# Tooling dropped for now as no one was willing to maintain it
a98ca7
Obsoletes: fontpackages-tools < %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
a98ca7
Requires:  fontconfig
a98ca7
Requires:  libappstream-glib
a98ca7
Requires:  uchardet
a98ca7
a98ca7
# For the experimental generator
a98ca7
Requires:  python3-ruamel-yaml
a98ca7
Requires:  python3-lxml
a98ca7
a98ca7
%description
a98ca7
This package provides build-stage rpm automation to simplify the creation of
a98ca7
fonts packages.
a98ca7
a98ca7
It does not need to be included in the default build root: fonts-srpm-macros
a98ca7
will pull it in for fonts packages only.
a98ca7
a98ca7
%package -n fonts-srpm-macros
a98ca7
Summary:   Source-stage rpm automation for fonts packages
a98ca7
Requires:  redhat-rpm-config
a98ca7
a98ca7
%description -n fonts-srpm-macros
a98ca7
This package provides SRPM-stage rpm automation to simplify the creation of
a98ca7
fonts packages.
a98ca7
a98ca7
It limits itself to the automation subset required to create fonts SRPM
a98ca7
packages and needs to be included in the default build root.
a98ca7
a98ca7
The rest of the automation is provided by the fonts-rpm-macros package, that
a98ca7
fonts-srpm-macros will pull in for fonts packages only.
a98ca7
a98ca7
%package -n fonts-filesystem
a98ca7
Summary:   Directories used by font packages
a98ca7
License:   MIT
a98ca7
a98ca7
Provides:  fontpackages-filesystem = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
Obsoletes: fontpackages-filesystem < %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
a98ca7
%description -n fonts-filesystem
a98ca7
This package contains the basic directory layout used by font packages,
a98ca7
including the correct permissions for the directories.
a98ca7
a98ca7
%package -n fonts-rpm-templates
a98ca7
Summary:   Example fonts packages rpm spec templates
a98ca7
License:   MIT
a98ca7
a98ca7
Requires:    fonts-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
Supplements: fonts-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
a98ca7
a98ca7
%description -n fonts-rpm-templates
a98ca7
This package contains documented rpm spec templates showcasing how to use the
a98ca7
macros provided by fonts-rpm-macros to create fonts packages.
a98ca7
a98ca7
%prep
a98ca7
%forgesetup
a98ca7
%writevars -f rpm/macros.d/macros.fonts-srpm _fontbasedir _fontconfig_masterdir _fontconfig_confdir _fontconfig_templatedir
a98ca7
for template in templates/rpm/*\.spec ; do
a98ca7
  target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g")
a98ca7
  grep -v '^%%dnl' "${template}" > "${target}"
a98ca7
  touch -r "${template}" "${target}"
a98ca7
done
a98ca7
a98ca7
%install
a98ca7
install -m 0755 -d    %{buildroot}%{_fontbasedir} \
a98ca7
                      %{buildroot}%{_fontconfig_masterdir} \
a98ca7
                      %{buildroot}%{_fontconfig_confdir} \
a98ca7
                      %{buildroot}%{_fontconfig_templatedir}
a98ca7
a98ca7
install -m 0755 -vd   %{buildroot}%{_spectemplatedir}
a98ca7
install -m 0644 -vp   templates/rpm/*spec \
a98ca7
                      %{buildroot}%{_spectemplatedir}
a98ca7
install -m 0755 -vd   %{buildroot}%{ftcgtemplatedir}
a98ca7
install -m 0644 -vp   templates/fontconfig/*{conf,txt} \
a98ca7
                      %{buildroot}%{ftcgtemplatedir}
a98ca7
a98ca7
install -m 0755 -vd   %{buildroot}%{rpmmacrodir}
a98ca7
install -m 0644 -vp   rpm/macros.d/macros.fonts-* \
a98ca7
                      %{buildroot}%{rpmmacrodir}
a98ca7
install -m 0755 -vd   %{buildroot}%{_rpmluadir}/fedora/srpm
a98ca7
install -m 0644 -vp   rpm/lua/srpm/*lua \
a98ca7
                      %{buildroot}%{_rpmluadir}/fedora/srpm
a98ca7
install -m 0755 -vd   %{buildroot}%{_rpmluadir}/fedora/rpm
a98ca7
install -m 0644 -vp   rpm/lua/rpm/*lua \
a98ca7
                      %{buildroot}%{_rpmluadir}/fedora/rpm
a98ca7
a98ca7
install -m 0755 -vd   %{buildroot}%{_bindir}
a98ca7
install -m 0755 -vp   bin/* %{buildroot}%{_bindir}
a98ca7
a98ca7
%files
a98ca7
%license LICENSE.txt
a98ca7
%{_bindir}/*
a98ca7
%{rpmmacrodir}/macros.fonts-rpm*
a98ca7
%{_rpmluadir}/fedora/rpm/*.lua
a98ca7
a98ca7
%files -n fonts-srpm-macros
a98ca7
%license LICENSE.txt
a98ca7
%doc     *.md changelog.txt
a98ca7
%{rpmmacrodir}/macros.fonts-srpm*
a98ca7
%{_rpmluadir}/fedora/srpm/*.lua
a98ca7
a98ca7
%files -n fonts-filesystem
a98ca7
%dir %{_datadir}/fontconfig
a98ca7
%dir %{_fontbasedir}
a98ca7
%dir %{_fontconfig_masterdir}
a98ca7
%dir %{_fontconfig_confdir}
a98ca7
%dir %{_fontconfig_templatedir}
a98ca7
a98ca7
%files -n fonts-rpm-templates
a98ca7
%license LICENSE-templates.txt
a98ca7
%doc     *.md changelog.txt
a98ca7
%{_spectemplatedir}/*.spec
a98ca7
%dir %{ftcgtemplatedir}
a98ca7
%doc %{ftcgtemplatedir}/*conf
a98ca7
%doc %{ftcgtemplatedir}/*txt
a98ca7
a98ca7
%changelog
a98ca7
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
a98ca7
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a98ca7
  Related: rhbz#1991688
a98ca7
a98ca7
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com>
a98ca7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a98ca7
a98ca7
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-5
a98ca7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a98ca7
a98ca7
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.5-4
a98ca7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a98ca7
a98ca7
* Sat May 23 17:00:05 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1:2.0.5-3
a98ca7
- Insert Epoch in Requires/Provides/Obsoletes
a98ca7
a98ca7
* Sat May 23 09:03:10 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1:2.0.5-2
a98ca7
- Revert to 2.0.5
a98ca7
a98ca7
* Tue Apr 28 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 3.0.3-1
a98ca7
🐞 Fix bugs in the 3.0.2 refactoring
a98ca7
- 3.0.2-1
a98ca7
🐞 Workaround Fedora problems created by rpm commit 93604e2
a98ca7
   harder
a98ca7
a98ca7
* Mon Apr 27 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 3.0.1-1
a98ca7
🐞 Workaround Fedora problems created by rpm commit 93604e2
a98ca7
a98ca7
* Fri Apr  3 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.5-1
a98ca7
✅ do not add empty urls to appstream files
a98ca7
a98ca7
* Thu Apr  2 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.4-2
a98ca7
✅ validate fontconfig files by default
a98ca7
a98ca7
* Sat Feb 29 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.3-1
a98ca7
✅ minor rpmlint-oriented fixlets
a98ca7
a98ca7
* Sat Feb 22 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.2-1
a98ca7
✅ improve experimental fontconfig configuration generator
a98ca7
a98ca7
* Thu Feb 20 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.1-3
a98ca7
✅ limit descriptions to 80 columns
a98ca7
a98ca7
* Fri Feb 14 2020 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.1-2
a98ca7
✅ use fonts packaging guidelines as URL
a98ca7
- 2.0.1-1
a98ca7
✅ first 2.x version proposed to Fedora, after FPC approval
a98ca7
   https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2020-02-13/fpc.2020-02-13-17.00.txt
a98ca7
a98ca7
* Mon Nov 11 2019 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 2.0.0-1
a98ca7
✅ transform into fonts-rpm-macros
a98ca7
✅ major rpm macro and rpm spec template rework
a98ca7
a98ca7
a98ca7
* Mon Nov 10 2008 Nicolas Mailhot <nim@fedoraproject.org>
a98ca7
- 1.0-1
a98ca7
✅ initial release