forked from freenas/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (32 loc) · 1.09 KB
/
Makefile
File metadata and controls
35 lines (32 loc) · 1.09 KB
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
PREFIX ?= /usr/local
PYTHON ?= python
VENV_PYTHON = ${.CURDIR}/venv/bin/python3.6
VENV_PIP = ${.CURDIR}/venv/bin/pip
BE_ROOT ?= ${.CURDIR}/..
install:
install tools/cli ${PREFIX}/bin/
install tools/logincli ${PREFIX}/bin/
install -d ${PREFIX}/lib/freenascli
install -d ${PREFIX}/lib/freenascli/src
install -d ${PREFIX}/lib/freenascli/plugins
install -d ${PREFIX}/lib/freenascli/examples
cp -R src/ ${PREFIX}/lib/freenascli/src/
cp -R plugins/ ${PREFIX}/lib/freenascli/plugins/
cp -R examples/ ${PREFIX}/lib/freenascli/examples/
run:
pyvenv-3.6 venv
${VENV_PIP} install -U cython==0.24.1 setuptools six ply columnize natural termcolor texttable pyte future rollbar gnureadline
${VENV_PIP} install -U --egg ${BE_ROOT}/py-freenas.utils
${VENV_PIP} install -U --egg ${BE_ROOT}/py-filewrap
${VENV_PIP} install -U --egg ${BE_ROOT}/dispatcher-client/python
PYTHONPATH=. ${VENV_PYTHON} -m freenas.cli.repl ${ARGS}
sync:
.if defined(dir)
rsync -avl \
--rsync-path="sudo rsync" \
--delete \
--exclude '.git' \
--exclude '.idea' . ${host}:${dir}/
.else
.error Error: Undefined target directory
.endif