forked from talkincode/toughradius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (39 loc) · 1.42 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
install:
(\
virtualenv venv --relocatable;\
test -d /var/toughradius/data || mkdir -p /var/toughradius/data;\
rm -f /etc/toughradius.conf && cp etc/toughradius.conf /etc/toughradius.conf;\
rm -f /etc/toughradius.json && cp etc/toughradius.json /etc/toughradius.json;\
rm -f /etc/init.d/toughradius && cp etc/toughradius /etc/init.d/toughradius;\
chmod +x /etc/init.d/toughradius && chkconfig toughradius on;\
rm -f /usr/lib/systemd/system/toughradius.service && cp etc/toughradius.service /usr/lib/systemd/system/toughradius.service;\
chmod 754 /usr/lib/systemd/system/toughradius.service && systemctl enable toughradius;\
systemctl daemon-reload;\
)
install-deps:
(\
yum install -y epel-release;\
yum install -y wget zip python-devel libffi-devel openssl openssl-devel gcc git;\
yum install -y czmq czmq-devel python-virtualenv;\
yum install -y mysql-devel MySQL-python redis;\
)
venv:
(\
test -d venv || virtualenv venv;\
venv/bin/pip install -U pip;\
venv/bin/pip install -U wheel;\
venv/bin/pip install -U coverage;\
venv/bin/pip install -U -r requirements.txt;\
)
upgrade:
venv/bin/pip install -U --no-deps toughlib txradius && git pull
test:
sh runtests.sh
initdb:
venv/bin/python toughctl --initdb -f -c /etc/toughradius.json
inittest:
venv/bin/python toughctl --inittest -c /etc/toughradius.json
clean:
rm -fr venv
all:install-deps venv install
.PHONY: all install install-deps upgrade test initdb inittest clean