From ec4040cab4aa026e268fa488026244e073954efc Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 20 Sep 2018 13:38:50 +0200 Subject: [PATCH] Adapt Makefile --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f2ba05c..fc166cc 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,17 @@ REPO = /srv/www/repo/TESTING/salt-packages/ VERSION = $(shell cat VERSION ) RELEASE = $(shell cat RELEASE ) NRELEASE = $(shell echo $(RELEASE) + 1 | bc ) +YEAR = $(shell date +%Y ) package: sed s/VERSION/$(VERSION)/g oss-pkg-$(PACKAGE).spec.in > oss-pkg-$(PACKAGE).spec sed -i s/RELEASE/$(NRELEASE)/g oss-pkg-$(PACKAGE).spec sed -i s/PACKAGE/$(PACKAGE)/g oss-pkg-$(PACKAGE).spec + sed -i s/YEAR/$(YEAR)/g oss-pkg-$(PACKAGE).spec mkdir -p oss-pkg-$(PACKAGE) - sed s/PACKAGE/$(PACKAGE)/g ../template/temlate.sls > oss-pkg-$(PACKAGE)/$(PACKAGE).sls + if [ ! -e $(PACKAGE).sls ]; then cp ../template/template.sls $(PACKAGE).sls; fi + sed s/PACKAGE/$(PACKAGE)/g $(PACKAGE).sls > oss-pkg-$(PACKAGE)/$(PACKAGE).sls if [ -d repo-ng ]; then ln -s ../repo-ng/ oss-pkg-$(PACKAGE)/repo-ng; fi tar hjcvpf oss-pkg-$(PACKAGE).tar.bz2 oss-pkg-$(PACKAGE) rm -rf oss-pkg-$(PACKAGE) -- 2.43.0