Blame fonts-rpm-macros.spec

a46970b
# SPDX-License-Identifier: MIT
a46970b
%global forgeurl  https://pagure.io/fonts-rpm-macros
d7cd26b
Version: 2.0.4
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
1ea484b
Release:   2%{?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
a46970b
Requires:  fonts-srpm-macros = %{version}-%{release}
a46970b
Requires:  fonts-filesystem  = %{version}-%{release}
a46970b
a46970b
Provides:  fontpackages-devel = %{version}-%{release}
a46970b
Obsoletes: fontpackages-devel < %{version}-%{release}
a46970b
# Tooling dropped for now as no one was willing to maintain it
a46970b
Obsoletes: fontpackages-tools < %{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
a46970b
Provides:  fontpackages-filesystem = %{version}-%{release}
a46970b
Obsoletes: fontpackages-filesystem < %{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
a46970b
Requires:    fonts-rpm-macros = %{version}-%{release}
a46970b
Supplements: fonts-rpm-macros = %{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")
a46970b
  grep -v '^#' "${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
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