package-notes/package-notes.spec
2022-01-14 18:50:39 +01:00

57 lines
1.5 KiB
RPMSpec

Name: package-notes
Version: 0.4
Release: %autorelease
Summary: Generate a linker script to insert .note.package section
%global forgeurl https://github.com/systemd/package-notes
%forgemeta
License: CC0
URL: %{forgeurl}
Source0: %{forgesource}
Source1: generate-rpm-note.sh
Source2: macros.package-notes-srpm
BuildArch: noarch
BuildRequires: python3-devel
Requires: python3dist(simplejson)
%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}
%description srpm-macros
RPM macros to inject a linker script into link flags and a helper to generate
a script that inserts a section with an ELF note with a JSON payload that
describes the package the binary was built for.
%prep
%autosetup
%build
# nothing to do
%install
install -Dt %{buildroot}%{_bindir}/ generate-package-notes
install -m0644 -Dt %{buildroot}%{_mandir}/man1/ debian/generate-package-notes.1
# A partial reimplementation without Python
install -Dt %{buildroot}%{_rpmconfigdir}/ %{SOURCE1}
install -m0644 -Dt %{buildroot}%{_rpmmacrodir}/ %{SOURCE2}
%files
%{_bindir}/generate-package-notes
%{_mandir}/man1/generate-package-notes.1*
%files srpm-macros
%{_rpmconfigdir}/generate-rpm-note.sh
%{_rpmmacrodir}/macros.package-notes-srpm
%changelog
%autochangelog