spec: use forgemeta

This changes the name of the source tarball, but apart from that has
no effect as-is.

However, if the `commit` global is set, then the source tarball is
expected to be the standard git-archive at that commit, and the
release field is set to contain the date and the git sha. This is
useful for when we want to build rpms between releases.

This works analogously to how osbulid-composer currently works.

See <https://fedoraproject.org/wiki/Forge-hosted_projects_packaging_automation>
for details.

Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-02-20 23:29:47 +01:00
parent bd6e6bde56
commit 31f3533886
2 changed files with 10 additions and 5 deletions

View file

@ -8,7 +8,7 @@ sdist:
find `pwd`/dist -name '*.tar.gz' -printf '%f\n' -exec mv {} . \;
tarball:
git archive --prefix=osbuild-$(VERSION)/ --format=tar.gz HEAD > $(VERSION).tar.gz
git archive --prefix=osbuild-$(VERSION)/ --format=tar.gz HEAD > osbuild-$(VERSION).tar.gz
srpm: $(PACKAGE_NAME).spec check-working-directory tarball
/usr/bin/rpmbuild -bs \