forked from letheanVPN/lthn-app-vpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
75 lines (59 loc) · 2.02 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
PASS=1234
CN=ItnsVPNFakeCN
DOCKER=docker
-include env.mk
all:
env.mk:
@if [ "$(MAKECMDGOALS)" != "docker" ]; then \
if ! [ -f env.mk ]; then echo "You must configure first!" ; ./configure.sh --help; exit 1; fi; \
echo "Seems to be configured. Run make install."; \
fi
install: env.mk
chmod +x install.sh
INSTALL_PREFIX=$(INSTALL_PREFIX) \
FORCE=$(FORCE) \
LTHN_PREFIX=$(LTHN_PREFIX) \
OPENVPN_BIN=$(OPENVPN_BIN) \
PYTHON_BIN=$(PYTHON_BIN) \
PIP_BIN=$(PIP_BIN) \
SUDO_BIN=$(SUDO_BIN) \
HAPROXY_BIN=$(HAPROXY_BIN) \
OPENSSL_BIN=$(OPENSSL_BIN) \
LTHN_USER=$(LTHN_USER) \
LTHN_GROUP=$(LTHN_GROUP) \
CLIENT=$(CLIENT) \
SERVER=$(SERVER) \
./install.sh
install-client:
@$(MAKE) install CLIENT=y
install-server:
@$(MAKE) install SERVER=y
clean:
@echo Note this cleans only build directory. If you want to uninstall package, do it manually by removing files from install location.
@echo Your last install dir is $(LTHN_PREFIX)
rm -rf build
ca: build/ca/index.txt
build/ca/index.txt: env.mk
./configure.sh --generate-ca --with-capass "$(PASS)" --with-cn "$CN"
docker-img:
docker build -t lethean/lethean-vpn:devel .
docker: docker-img
docker-clean:
docker rm -v lethean-vpn:devel
docker-shell:
mkdir -p build/etc
mkdir -p build/bcdata
docker run -i -t \
--mount type=bind,source=$$(pwd)/build/etc,target=/opt/lthn/etc \
--mount type=bind,source=$$(pwd)/build/bcdata,target=/home/lthn \
lethean/lethean-vpn:devel sh
lthnvpnc:
mkdir bin
@echo pyinstaller --add-data "lib;lib" --add-data "conf;conf" \
--add-data "bin/cygwin1.dll;bin" --add-data "bin/cygcrypto-1.0.0.dll;bin" --add-data "bin/cygz.dll;bin" \
--add-data "bin/liblzo2-2.dll;bin" --add-data "bin/libpkcs11-helper-1.dll;bin" \
--add-data "bin/cygpcre-1.dll;bin" --add-data "bin/cygssl-1.0.0.dll;bin" \
--add-binary "bin/openvpn.exe;bin" --add-binary "bin/tstunnel.exe;bin" --add-binary "bin/haproxy.exe;bin" \
-p lib -p 'C:\Python37\Lib\site-packages' \
--noconfirm --log-level=WARN --onefile --nowindow \
client/lthnvpnc.py