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).
28 lines
734 B
Makefile
28 lines
734 B
Makefile
#!/usr/bin/make
|
|
|
|
PKG = strongTNC
|
|
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
|
|
|
|
$(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)
|
|
mkdir -p $(DEPS)
|
|
pip download -d $(DEPS) -r $(DIR)/requirements.txt six
|
|
@touch $@
|
|
|
|
install: .$(PKG)-deps-$(REV)
|
|
# six is required for djangorestframework-camel-case
|
|
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
|