diff options
-rw-r--r-- | .copr/Makefile | 21 | ||||
-rw-r--r-- | .gitignore | 1 |
2 files changed, 22 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 diff --git a/.gitignore b/.gitignore index 989a338737d..0b2fba8c9ed 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ Testing .DS_Store install_manifest.txt *.cbp +!/.copr/Makefile |