-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·37 lines (32 loc) · 946 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#PI_VERSION=v2.19.1-1
PI_VERSION=${VERSION}
VENV=~/venv
phony:
@echo Build Stretch package for privacyIDEA
@echo
@echo make clean
@echo make init
@echo make build
clean:
rm -fr ~/src/privacyidea
rm -fr ${VENV}
init:
make clean
mkdir -p ~/OUT
# checkout branch
(cd ~/src; git clone --recursive https://github.com/privacyidea/privacyidea.git)
(cd ~/src/privacyidea; git checkout ${PI_VERSION})
# Install virtualenv
@echo You now have to source ${VENV}
virtualenv ${VENV}
(. ${VENV}/bin/activate; pip install --upgrade setuptools pip)
(. ${VENV}/bin/activate; pip install -r ~/src/privacyidea/requirements.txt)
(. ${VENV}/bin/activate; pip install MySQL-python)
build:
mkdir -p ~/src/privacyidea/DEBUILD
# build package
(. ${VENV}/bin/activate; cd ~/src/privacyidea; make venvdeb)
cp ~/src/privacyidea/DEBUILD/*.deb ~/OUT
ifndef VERSION
$(error VERSION not set. Set VERSION to build like VERSION=v2.19.1)
endif