diff --git a/Makefile b/Makefile index 2230376..05fa4db 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,13 @@ RPMBUILD :=$(shell which rpmbuild) RELEASE := $(if $(RELEASE),$(RELEASE),$(LAST_RELEASE)) VERSION := $(if $(VERSION),$(VERSION),$(LAST_VERSION)) -NVR := $(NAME)-$(VERSION)-$(RELEASE).$(DIST) all: spec src srpm pre: ## Get the last remote hash for the specified branch $(eval REMOTEHASH := $(shell git ls-remote $(BASE) $(BRANCH) | awk '{print $$1}')) $(eval RELEASE=$(shell echo $$(($(RELEASE)+1)))) + $(eval NVR=$(shell echo $(NAME)-$(VERSION)-$(RELEASE).$(DIST))) echo: pre ## Print the passed (or computed) parameters @echo PWD $(PWD)/SOURCES @@ -48,9 +48,11 @@ srpm: ## Build the srpm --define "_sourcedir $(PWD)/SOURCES" \ --define "_srcrpmdir $(PWD)" \ --define "dist .$(DIST)" + mv $(NVR).src.rpm $(PWD)/SRPMS/ clean: ## Clean the workdir rm -f *.src.rpm + rm -f SRPMS/*.src.rpm rm -f SPECS/cephadm.spec help: ## Print the Help