| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 1 | SHELL := /bin/bash |
| garciadeblas | 06e6c39 | 2017-03-28 15:42:20 +0200 | [diff] [blame^] | 2 | all: pypackage debpackage |
| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 3 | |
| 4 | prepare: |
| 5 | mkdir -p build |
| 6 | cp *.py build/ |
| 7 | #cd build; mv openmanod.py openmanod |
| 8 | cp openmano build/ |
| 9 | cp openmanod.cfg build/ |
| garciadeblas | 06e6c39 | 2017-03-28 15:42:20 +0200 | [diff] [blame^] | 10 | cp requirements.txt build/ |
| 11 | cp README.rst build/ |
| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 12 | cp openmano.service build/ |
| 13 | cp -r vnfs build/ |
| 14 | cp -r scenarios build/ |
| 15 | cp -r instance-scenarios build/ |
| 16 | cp -r scripts build/ |
| 17 | cd build/scripts; mv service-openmano.sh service-openmano; mv openmano-report.sh openmano-report |
| 18 | cp -r database_utils build/ |
| 19 | |
| garciadeblas | 06e6c39 | 2017-03-28 15:42:20 +0200 | [diff] [blame^] | 20 | connectors: prepare |
| 21 | # python-novaclient is required for that |
| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 22 | rm -f build/openmanolinkervimconn.py |
| 23 | cd build; for i in `ls vimconn_*.py |sed "s/\.py//"` ; do echo "import $$i" >> openmanolinkervimconn.py; done |
| 24 | python build/openmanolinkervimconn.py |
| 25 | rm -f build/openmanolinkervimconn.py |
| 26 | |
| garciadeblas | 06e6c39 | 2017-03-28 15:42:20 +0200 | [diff] [blame^] | 27 | build: prepare |
| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 28 | python -m py_compile build/*.py |
| 29 | |
| garciadeblas | 06e6c39 | 2017-03-28 15:42:20 +0200 | [diff] [blame^] | 30 | pypackage: build |
| 31 | cd build; ./setup.py sdist |
| 32 | #cp build/dist/* /root/artifacts/... |
| 33 | |
| 34 | debpackage: build |
| 35 | echo "Nothing to be done yet" |
| 36 | #fpm -s python -t deb build/setup.py |
| 37 | |
| 38 | snappackage: |
| 39 | echo "Nothing to be done yet" |
| 40 | |
| 41 | test: |
| 42 | ./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim |
| 43 | |
| garciadeblas | 9453a8a | 2017-03-09 16:21:24 +0100 | [diff] [blame] | 44 | clean: |
| 45 | rm -rf build |
| 46 | #find build -name '*.pyc' -delete |
| 47 | #find build -name '*.pyo' -delete |
| 48 | |