1359905724
While these macros were previously shipped as a subpackage of python-rpmautospec, they do not depend on the Python module, and the rest of that package includes dependencies not wanted in RHEL/ELN (such as koji).
17 lines
707 B
Plaintext
17 lines
707 B
Plaintext
%autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
release_number = tonumber(rpm.expand("%{?_rpmautospec_release_number}%{!?_rpmautospec_release_number:1}"));
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
print(release_number + base_release_number - 1);
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
%autochangelog %{lua:
|
|
locale = os.setlocale(nil)
|
|
os.setlocale("C.utf8")
|
|
date = os.date("%a %b %d %Y")
|
|
os.setlocale(locale)
|
|
packager = rpm.expand("%{?packager}%{!?packager:John Doe <packager@example.com>}")
|
|
evr = rpm.expand("%{?epoch:%{epoch}:}%{version}-%{release}")
|
|
print("* " .. date .. " " .. packager .. " - " .. evr .. "\\n")
|
|
print("- local build")
|
|
}
|
|
|