Makefile: use spec file from HEAD to make rpm

The spec file in the current working directory might have changes. When
building rpms with the commit hash in the version, they ought to be
built with the spec file from that hash as well.
This commit is contained in:
Lars Karlitski 2020-03-05 19:33:41 +01:00 committed by Tom Gundersen
parent 75dd1db6e3
commit 23fe851d4d

View file

@ -68,7 +68,7 @@ RPM_TARBALL=rpmbuild/SOURCES/osbuild-composer-$(COMMIT).tar.gz
$(RPM_SPECFILE):
mkdir -p $(CURDIR)/rpmbuild/SPECS
echo "%global commit $(COMMIT)" | cat - golang-github-osbuild-composer.spec > $(RPM_SPECFILE)
(echo "%global commit $(COMMIT)"; git show HEAD:golang-github-osbuild-composer.spec) > $(RPM_SPECFILE)
$(RPM_TARBALL):
mkdir -p $(CURDIR)/rpmbuild/SOURCES