%global major 1 %global minor 0 %global release 2 Name: demus-packaging Version: %{major}.%{minor}.%{release} Release: %autorelease Summary: Macros and scripts to assist in rpm packaging workflows URL: https://git.demus.dk/demus/demus-packaging License: GPL-3.0-or-later Source: go2rpm-vendor-update.sh Source: regenerate-from-spec.sh Source: macros.demus-packaging Source: LICENSE Source: README.md Requires: bash go-vendor-tools+all rpmdevtools askalono-cli Obsoletes: demus-packaging-utils < 1.0.0 Provides: demus-packaging-utils = %{version} BuildArch: noarch %description * regenerate-from-spec: Regenerate tool-generated sources referred to in a spec file * go-vendor-update: An script that replicates the parameters used by go2rpm to generate the vendor archive, license expression and configuration. It is used in the above regenerate script. * verify_source_checksum rpm macro: Validate that the checksums in a sources file included in a spec matches the unpacked files. * stripped_basename macro: Adds the extension stripping positional parameter to %stripped_basename * binshellname macro: Produce the stripped name of a .sh script %prep %if %{exists:%{S:2}} %{load:%{S:2}} %endif %?verify_source_checksum %build %install %{__install} -m 0755 -d %{buildroot}%{_bindir} %{__install} -m 0755 -d %{buildroot}%{_rpmmacrodir} %{__install} -p -m 755 %{S:0} %{buildroot}%{_bindir}/%{binshellname:%{S:0}} %{__install} -p -m 755 %{S:1} %{buildroot}%{_bindir}/%{binshellname:%{S:1}} %{__install} -p -m 644 %{S:2} %{buildroot}%{_rpmmacrodir}/ %{__install} -p -m 644 %{S:3} %{S:4} %{_builddir} %files %doc README.md %license LICENSE %{_bindir}//%{binshellname:%{S:0}} %{_bindir}//%{binshellname:%{S:1}} %{_rpmmacrodir}/* %changelog %autochangelog