]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Use specific versions of swidGenerator and strongTNC
authorTobias Brunner <tobias@strongswan.org>
Wed, 30 Jun 2021 13:16:47 +0000 (15:16 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 30 Jun 2021 14:17:39 +0000 (16:17 +0200)
This way we get updated versions automatically (referencing "master"
required manually deleting the downloaded archives and the unpacked
directories).  It also allows switching versions when working in different
branches (note that REV can also be set to a commit ID, e.g. to test
changes before tagging them later and merging the branch).

testing/scripts/recipes/014_swid_generator.mk
testing/scripts/recipes/015_strongTNC.mk

index 589146906486dd3f29436a6d8546286c4e3ec1e1..3394620e25557fc438694b9013ac6914b29f23d8 100644 (file)
@@ -1,16 +1,20 @@
 #!/usr/bin/make
 
 PKG = swidGenerator
-ZIP = $(PKG)-master.zip
-SRC = https://github.com/strongswan/$(PKG)/archive/master.zip
+REV = v1.1.0
+DIR = $(PKG)-$(REV)
+TAR = $(PKG)-$(REV).tar.gz
+SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).tar.gz
 
 all: install
 
-$(ZIP):
-       wget --ca-directory="/usr/share/ca-certificates/mozilla" $(SRC) -O $(ZIP)
+$(TAR):
+       wget --ca-directory="/usr/share/ca-certificates/mozilla" $(SRC) -O $(TAR)
 
-$(PKG)-master: $(ZIP)
-       unzip $(ZIP)
+.$(PKG)-unpacked-$(REV): $(TAR)
+       # a tag's "v" prefix is not reflected in the directory name in the archive
+       [ -d $(DIR) ] || (mkdir -p $(DIR); tar -xf $(TAR) --strip-components=1 -C $(DIR))
+       @touch $@
 
-install: $(PKG)-master
-       cd $(PKG)-master && python setup.py install
+install: .$(PKG)-unpacked-$(REV)
+       cd $(DIR) && python setup.py install
index 51c9894c6f7afdbb78e911b91718d44392755c47..b94a3114ab90162684bbea247aac6c6dee529878 100644 (file)
@@ -1,8 +1,10 @@
 #!/usr/bin/make
 
 PKG = strongTNC
-ZIP = $(PKG)-master.zip
-SRC = https://github.com/strongswan/$(PKG)/archive/master.zip
+REV = 0.9.9
+DIR = $(PKG)-$(REV)
+ZIP = $(PKG)-$(REV).zip
+SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).zip
 DEPS = $(PKG)-deps
 
 all: install
@@ -10,14 +12,16 @@ all: install
 $(ZIP):
        wget --ca-directory=/usr/share/ca-certificates/mozilla/ $(SRC) -O $(ZIP)
 
-$(PKG)-master: $(ZIP)
-       unzip -u $(ZIP)
+.$(PKG)-unpacked-$(REV): $(ZIP)
+       [ -d $(DIR) ] || unzip $(ZIP)
+       @touch $@
 
-$(DEPS): $(PKG)-master
+.$(PKG)-deps-$(REV): .$(PKG)-unpacked-$(REV)
        mkdir -p $(DEPS)
-       pip download -d $(DEPS) -r $(PKG)-master/requirements.txt six
+       pip download -d $(DEPS) -r $(DIR)/requirements.txt six
+       @touch $@
 
-install: $(DEPS)
+install: .$(PKG)-deps-$(REV)
        # six is required for djangorestframework-camel-case
-       pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(PKG)-master/requirements.txt six
-       cp -r $(PKG)-master /var/www/tnc && chgrp -R www-data /var/www/tnc && chmod g+sw /var/www/tnc
+       pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt six
+       cp -r $(DIR) /var/www/tnc && chgrp -R www-data /var/www/tnc && chmod g+sw /var/www/tnc