X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=Makefile;h=5bde339b2ee3bbf073043b7ef91802e9b6769213;hb=refs%2Fchanges%2F94%2F1594%2F1;hp=2c7255b3245bcc2a28fb94c6b51f5fa5be8cd296;hpb=cf1826b8466193d53981fe6c61d78e9746b816f1;p=osm%2FRO.git diff --git a/Makefile b/Makefile index 2c7255b3..5bde339b 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,19 @@ SHELL := /bin/bash -all: pip deb +all: package install prepare: + pip install setuptools mkdir -p build/ + #git describe | sed -e 's/^v//' > build/RO_VERSION + echo "1.1.5" > build/RO_VERSION cp MANIFEST.in build/ cp requirements.txt build/ cp README.rst build/ cp setup.py build/ + cp stdeb.cfg build/ cp -r osm_ro build/ cp openmano build/ cp openmanod build/ - cp openmanod.cfg build/ - cp osm-ro.service build/ cp -r vnfs build/osm_ro cp -r scenarios build/osm_ro cp -r instance-scenarios build/osm_ro @@ -30,28 +32,37 @@ build: connectors prepare pip: prepare cd build && ./setup.py sdist - cd build && ./setup.py bdist_wheel -deb: prepare - echo "Nothing to be done" - #cd build; ./setup.py --command-packages=stdeb.command bdist_deb - #fpm -s python -t deb build/setup.py +package: prepare + 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 snap: echo "Nothing to be done yet" install: - cd build && pip install dist/*.tar.gz + DEBIAN_FRONTEND=noninteractive apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip && \ + pip install --upgrade pip && \ + dpkg -i build/deb_dist/*.deb develop: prepare + #pip install -r requirements.txt cd build && ./setup.py develop -sync: - #cp build/dist/* /root/artifacts/... - test: ./test/basictest.sh --force --insert-bashrc --install-openvim --init-openvim +build-docker-from-source: + docker build -t osm/openmano -f docker/Dockerfile-local . + +run-docker: + docker-compose -f docker/openmano-compose.yml up + +stop-docker: + docker-compose -f docker/openmano-compose.yml down + clean: rm -rf build #find build -name '*.pyc' -delete