]> repo.cephalix.eu Git - MozillaFirefox.git/commitdiff
Adapt Makefile
authorbuildmaster <buildmaster@git.cephalix.eu>
Thu, 20 Sep 2018 11:38:52 +0000 (13:38 +0200)
committerbuildmaster <buildmaster@git.cephalix.eu>
Thu, 20 Sep 2018 11:38:52 +0000 (13:38 +0200)
Makefile

index f2ba05c41538f4d7781d3da64aa698aa74bbdb74..fc166cc7d169157b4da4f61f01246510f6906b99 100644 (file)
--- 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)