From 89c13992b03d106694962f2305f64843c3d7e56c Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mar 25 2021 12:33:33 +0000 Subject: Improve make clean and make srpm This commit fixes the version field in cephadm.spec.in and improves the clean and srpms targets. Now all the files are in the right place and ready to be built in cbs. --- 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