Blame fonts-rpm-macros.spec

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