strongswan/testing/scripts/recipes/015_strongTNC.mk
Tobias Brunner fa1cd74712 testing: Install required packages in venv of updated strongTNC
Update revision for some dependency updates.  While python3-setuptools is
installed on the system, the venv apparently can't use it.  legacy-cgi is
required to use that old Django version with newer Python releases.
2025-09-18 11:13:32 +02:00

31 lines
843 B
Makefile

#!/usr/bin/make
PKG = strongTNC
REV = f0ed6fa8ef6bcde56283c6da1bdbdaa3d651eb11
DIR = $(PKG)-$(REV)
ZIP = $(PKG)-$(REV).zip
SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).zip
DEPS = $(PKG)-deps
VENV = /usr/local/venvs/tnc
EXTRAS = setuptools legacy-cgi
all: install
$(ZIP):
wget --ca-directory=/usr/share/ca-certificates/mozilla/ $(SRC) -O $(ZIP)
.$(PKG)-unpacked-$(REV): $(ZIP)
[ -d $(DIR) ] || unzip $(ZIP)
@touch $@
.$(PKG)-deps-$(REV): .$(PKG)-unpacked-$(REV)
python3 -m venv $(VENV)
$(VENV)/bin/pip download -d $(DEPS) -r $(DIR)/requirements.txt $(EXTRAS)
@touch $@
install: .$(PKG)-deps-$(REV)
python3 -m venv $(VENV)
$(VENV)/bin/pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt $(EXTRAS)
cp -r $(DIR) /var/www/tnc && chgrp -R www-data /var/www/tnc && chmod g+sw /var/www/tnc