diff options
author | Arnstein Ressem <aressem@verizonmedia.com> | 2021-09-17 17:29:24 +0200 |
---|---|---|
committer | Arnstein Ressem <aressem@verizonmedia.com> | 2021-09-17 17:29:24 +0200 |
commit | cee707a66658217d67a25ee5cbf791bbc0373565 (patch) | |
tree | 214c1a7fb20cdacb67bd4b81c31d2b255ac8ad9d /.copr | |
parent | f7575896cd177ae85b009ef9d1c00829556a92b3 (diff) |
Add Makefile compatible with srpm builds on Copr.
Diffstat (limited to '.copr')
-rw-r--r-- | .copr/Makefile | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 00000000000..5b097ba0ad9 --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,21 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +TOP = $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) + +# Version +VESPA_VERSION := $(shell git tag --points-at HEAD | grep -oP "\d+\.\d+\.\d+" | sort -V | tail -1) + +RPMTOPDIR := $(HOME)/rpmbuild +SOURCEDIR := $(RPMTOPDIR)/SOURCES +SPECDIR := $(RPMTOPDIR)/SPECS +SPECFILE := $(SPECDIR)/vespa-$(VESPA_VERSION).spec + +srpm: + dnf install -y rpmdevtools + $(TOP)/../dist.sh $(VESPA_VERSION) + spectool -g -C $(SOURCEDIR) $(SPECFILE) + rpmbuild -bs --define "_topdir $(RPMTOPDIR)" $(SPECFILE) + cp -a $(RPMTOPDIR)/SRPMS/* $(outdir) +clean: + -rm -rf $(RPMTOPDIR) + +.PHONY: srpm clean |