fonts-rpm-macros/fonts-rpm-macros.spec

148 lines
5.1 KiB
RPMSpec
Raw Normal View History

2020-03-02 14:18:53 +08:00
%forgemeta
2020-04-09 22:03:22 +08:00
%global _spectemplatedir %{_datadir}/rpmdevtools/%{_vendor}
2020-03-02 14:18:53 +08:00
%global _docdir_fmt %{name}
%global ftcgtemplatedir %{_datadir}/fontconfig/templates
%global _fontbasedir %{_datadir}/fonts
%global _fontconfig_masterdir %{_sysconfdir}/fonts
%global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
%global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
Name: fonts-rpm-macros
2022-11-01 12:00:12 +00:00
Version: 4.0.2
Release: 1
2020-03-02 14:18:53 +08:00
Summary: Build-stage rpm automation for fonts packages
License: GPLv3+
URL: https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/
Source: https://pagure.io/fonts-rpm-macros/archive/%{version}/%{name}-%{version}.tar.gz
2020-03-02 14:18:53 +08:00
BuildArch: noarch
Requires: fonts-srpm-macros = %{version}-%{release}
Requires: fonts-filesystem = %{version}-%{release}
Provides: fontpackages-devel = %{version}-%{release}
Obsoletes: fontpackages-devel < %{version}-%{release}
Obsoletes: fontpackages-tools < %{version}-%{release}
2020-03-04 10:41:50 +08:00
Requires: fontconfig libappstream-glib uchardet python3-ruamel-yaml python3-lxml fonts-srpm-macros
Patch0001: bugfix-fonts-rpm-macros-macros.patch
2020-03-02 14:18:53 +08:00
%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
2020-03-04 10:43:51 +08:00
Requires: openEuler-rpm-config
2020-03-02 14:18:53 +08:00
%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 = %{version}-%{release}
Obsoletes: fontpackages-filesystem < %{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 = %{version}-%{release}
Supplements: fonts-rpm-macros = %{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.
%package_help
%prep
%autosetup -p1
for template in templates/rpm/*\.spec ; do
target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g")
grep -v '^#' "${template}" > "${target}"
touch -r "${template}" "${target}"
done
%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}
2020-04-09 22:03:22 +08:00
install -m 0755 -vd %{buildroot}%{_rpmluadir}/%{_vendor}/srpm
install -m 0644 -vp rpm/lua/srpm/*lua %{buildroot}%{_rpmluadir}/%{_vendor}/srpm
install -m 0755 -vd %{buildroot}%{_rpmluadir}/%{_vendor}/rpm
install -m 0644 -vp rpm/lua/rpm/*lua %{buildroot}%{_rpmluadir}/%{_vendor}/rpm
2020-03-02 14:18:53 +08:00
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp bin/* %{buildroot}%{_bindir}
%files
%defattr(-,root,root)
%license LICENSE.txt
%{_bindir}/*
2020-04-09 22:03:22 +08:00
%{_rpmluadir}/%{_vendor}/rpm/*.lua
2020-03-02 14:18:53 +08:00
%{rpmmacrodir}/macros.fonts-rpm*
%files -n fonts-srpm-macros
%defattr(-,root,root)
%license LICENSE.txt
2020-04-09 22:03:22 +08:00
%{_rpmluadir}/%{_vendor}/srpm/*.lua
2020-03-02 14:18:53 +08:00
%{rpmmacrodir}/macros.fonts-srpm*
%files -n fonts-filesystem
%defattr(-,root,root)
%dir %{_datadir}/fontconfig
%dir %{_fontbasedir}
%dir %{_fontconfig_confdir}
%dir %{_fontconfig_masterdir}
%dir %{_fontconfig_templatedir}
%files -n fonts-rpm-templates
%defattr(-,root,root)
%license LICENSE-templates.txt
%config(noreplace) %{_spectemplatedir}/*.spec
%dir %{ftcgtemplatedir}
%files help
%defattr(-,root,root)
%doc *.md changelog.txt
%doc %{ftcgtemplatedir}/*txt
%doc %{ftcgtemplatedir}/*conf
%changelog
* Tue Nov 01 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 4.0.2-1
2022-11-01 12:00:12 +00:00
- upgrade to 4.0.2
* Mon Sep 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.5-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix source url error
2020-07-23 10:05:35 +08:00
* Wed Jul 22 2020 xiaoweiwei <xiaoweiwei@huawei.com> - 2.0.5-1
- upgrade to 2.0.5
2020-04-09 22:03:22 +08:00
* Thu Apr 9 2020 songnannan <songnannan2@huawei.com> - 2.0.2-3
- change the spec template dir
2020-03-04 10:41:50 +08:00
* Wed Mar 4 2020 songnannan <songnannan2@huawei.com> - 2.0.2-2
- bugfix about macros
2020-03-02 14:18:53 +08:00
* Mon Mar 2 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.0.2-1
- Package init