Name: forge-rpm-macros
Version: 1.0
Release: 1%{dist}
Summary: A backport of properly working %%forgemeta macro
License: GPL+
URL:     https://src.fedoraproject.org/rpms/redhat-rpm-config

Source0: macros.forge
Source1: common.lua
Source2: forge.lua

Requires: redhat-rpm-config

%description
%summary.

%prep

%install
mkdir -p %{buildroot}%{_sysconfdir}/rpm
install -p -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/rpm/macros.forge-override
mkdir -p %{buildroot}%{_rpmconfigdir}/lua/fedora/srpm
install -p -m 644 %{SOURCE1} %{buildroot}%{_rpmluadir}/fedora/common.lua
install -p -m 644 %{SOURCE2} %{buildroot}%{_rpmluadir}/fedora/srpm/forge.lua

%files
%{_sysconfdir}/rpm/macros.forge-override
%{_rpmluadir}/fedora/common.lua
%{_rpmluadir}/fedora/srpm/forge.lua
