package-notes/package-notes.spec

48 lines
1.4 KiB
RPMSpec
Raw Normal View History

2021-11-15 22:25:56 +00:00
Name: package-notes
Version: 0.5
2021-11-15 22:25:56 +00:00
Release: %autorelease
Summary: Generate LDFLAGS to insert .note.package section
License: 0BSD
2021-11-15 22:25:56 +00:00
Source0: redhat-package-notes.in
Source1: generate-rpm-note.sh
Source2: macros.package-notes-srpm
2021-11-15 22:25:56 +00:00
BuildArch: noarch
%description
This package provides a generator of linker scripts that insert a section with
an ELF note with a JSON payload that describes the package the binary was built
for.
%package srpm-macros
Summary: %{summary}
Obsoletes: package-notes < 0.5
# Those are minimum versions that implement --package-metadata
Conflicts: binutils < 2.38-23
Conflicts: binutils-gold < 2.38-23
Conflicts: mold < 1.3.0
%description srpm-macros
RPM macros to insert a section with an ELF note with a JSON payload that
describes the package the binary was built for via compiler spec file.
2021-11-15 22:25:56 +00:00
%prep
# nothing to do
2021-11-15 22:25:56 +00:00
%build
sed "s|@OSCPE@|$(cat /usr/lib/system-release-cpe)|" %{SOURCE0} > redhat-package-notes
2021-11-15 22:25:56 +00:00
%install
install -Dt %{buildroot}%{_rpmconfigdir}/redhat/ redhat-package-notes
install -Dt %{buildroot}%{_rpmconfigdir}/ %{SOURCE1}
install -m0644 -Dt %{buildroot}%{_rpmmacrodir}/ %{SOURCE2}
2021-11-15 22:25:56 +00:00
%files srpm-macros
%{_rpmconfigdir}/generate-rpm-note.sh
%{_rpmmacrodir}/macros.package-notes-srpm
%{_rpmconfigdir}/redhat/redhat-package-notes
2021-11-15 22:25:56 +00:00
%changelog
%autochangelog