From: buildmaster Date: Thu, 20 Sep 2018 11:38:44 +0000 (+0200) Subject: Adapt Makefile X-Git-Url: https://repo.cephalix.eu/gitweb/?a=commitdiff_plain;h=11d6b78ef31f026c4d5807f9155274a7024553fe;p=BlueJ.git Adapt Makefile --- diff --git a/Makefile b/Makefile index edc201b..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) - ln -s ../$(PACKAGE).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) @@ -22,3 +25,4 @@ package: git commit -a -m "New release" git push +