Blame SPECS/fonts-rpm-macros.spec

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