From 8d8c850d2eace4c07881fd8237033a484612acee Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mar 25 2021 10:35:53 +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 diff --git a/SPECS/cephadm.spec.in b/SPECS/cephadm.spec.in index ade3989..9749c13 100644 --- a/SPECS/cephadm.spec.in +++ b/SPECS/cephadm.spec.in @@ -4,7 +4,7 @@ Name: cephadm Epoch: 2 Version: 16.1.0 -Release: 3%{?dist} +Release: 568%{?dist} Summary: Utility to bootstrap Ceph clusters License: LGPL-2.1 URL: https://ceph.io