-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
78 lines (63 loc) · 2.17 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
76
77
78
NETLIB = cpp-netlib-0.11.1-final
all:
$(MAKE) clean
$(MAKE) build unittest check_convention CONFIGURATION=DEBUG
$(MAKE) clean
$(MAKE) build unittest egg
clean:
rm -fr build dist osmosis.egg-info
.PHONY: build egg install_binary osmosis-cli
build: build/$(NETLIB)/.unpacked
$(MAKE) -f build.Makefile
build/$(NETLIB)/.unpacked: $(NETLIB).tar.gz
mkdir build > /dev/null 2> /dev/null || true
tar -xf $< -C build
touch $@
egg: dist/osmosis-1.0.linux-x86_64.tar.gz
unittest: build
PYTHONPATH=py python tests/main.py $(TESTS)
build/cpp/testtaskqueue.bin
check_convention:
python -m pep8 py tests --max-line-length=109
install_binary:
sudo cp -f build/cpp/osmosis.bin /usr/bin/osmosis
install:
-sudo systemctl stop osmosis
-sudo service osmosis stop
make install_binary
python py/get_system_setting.py systemManager
make install_service_`python py/get_system_setting.py systemManager`
if [ -d "/etc/bash_completion.d" ]; then \
sudo cp bash.completion.sh /etc/bash_completion.d/osmosis.sh; \
fi
install_service_systemd:
python py/get_system_setting.py serviceFilesDirPath
$(eval SERVICE_FILES_DIRPATH := $(shell python py/get_system_setting.py serviceFilesDirPath))
sudo cp osmosis.service ${SERVICE_FILES_DIRPATH}
sudo systemctl enable osmosis.service
if ["$(DONT_START_SERVICE)" == ""]; then sudo systemctl start osmosis; fi
install_service_upstart:
sudo cp upstart_osmosis.conf /etc/init/osmosis.conf
if ["$(DONT_START_SERVICE)" == ""]; then sudo service osmosis start; fi
uninstall:
-sudo systemctl stop osmosis
-sudo service osmosis stop
-sudo systemctl disable osmosis.service
sudo rm -f /usr/bin/osmosis
sudo rm -f /usr/lib/systemd/system/osmosis.service /etc/init/osmosis.conf
echo "CONSIDER ERASING /var/lib/osmosis"
dist/osmosis-1.0.linux-x86_64.tar.gz: setup.py py/*/*.py
python setup.py build
python setup.py bdist
python setup.py bdist_egg
venv:
virtualenv venv
source venv/bin/activate \
&& pip install -r dev-requirements.txt \
&& deactivate
@echo "Run 'source venv/bin/activate' to activate the virtual environment"
testo:
./build/cpp/osmosis.bin listlabels --objectStores osmosis.dc1.strato:1010 base
osmosis-cli:
skipper make
skipper build osmosis-cli