+build: connectors prepare
+ python -m py_compile build/osm_ro/*.py
+# cd build && tox -e flake8
+
+lib-openvim:
+ $(shell git clone https://osm.etsi.org/gerrit/osm/openvim)
+ LIB_BRANCH=$(shell git -C openvim branch -a|grep -oP 'remotes/origin/\K$(BRANCH)'); \
+ [ -z "$$LIB_BRANCH" ] && LIB_BRANCH='master'; \
+ echo "BRANCH: $(BRANCH)"; \
+ echo "LIB_OPENVIM_BRANCH: $$LIB_BRANCH"; \
+ git -C openvim checkout $$LIB_BRANCH
+ make -C openvim clean lite
+
+osm-im:
+ $(shell git clone https://osm.etsi.org/gerrit/osm/IM)
+ make -C IM clean all
+
+package: prepare
+# apt-get install -y python-stdeb
+ cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True
+ cd build && cp osm_ro/scripts/python-osm-ro.postinst deb_dist/osm-ro*/debian/
+ cd build/deb_dist/osm-ro* && dpkg-buildpackage -rfakeroot -uc -us
+ mkdir -p .build
+ cp build/deb_dist/python-*.deb .build/
+
+snap:
+ echo "Nothing to be done yet"
+
+install: lib-openvim osm-im
+ dpkg -i IM/deb_dist/python-osm-im*.deb
+ dpkg -i openvim/.build/python-lib-osm-openvim*.deb
+ dpkg -i .build/python-osm-ro*.deb
+ cd .. && \
+ OSMLIBOVIM_PATH=`python -c 'import lib_osm_openvim; print lib_osm_openvim.__path__[0]'` || FATAL "lib-osm-openvim was not properly installed" && \
+ OSMRO_PATH=`python -c 'import osm_ro; print osm_ro.__path__[0]'` || FATAL "osm-ro was not properly installed" && \
+ USER=root DEBIAN_FRONTEND=noninteractive $$OSMRO_PATH/database_utils/install-db-server.sh --updatedb || FATAL "osm-ro db installation failed" && \
+ USER=root DEBIAN_FRONTEND=noninteractive $$OSMLIBOVIM_PATH/database_utils/install-db-server.sh -u mano -p manopw -d mano_vim_db --updatedb || FATAL "lib-osm-openvim db installation failed"
+ service osm-ro restart
+
+develop: prepare
+# pip install -r requirements.txt
+ cd build && ./setup.py develop