[BGPVPN] Uplift plugin to Mitaka
[fuel.git] / build / f_isoroot / f_ovsnfv-dpdk-pluginbuild / Makefile
index 6b76fbe..9e432d1 100644 (file)
@@ -22,33 +22,34 @@ all: .ovsnfvbuild
 
 .PHONY: clean
 clean:
-       @rm -f .ovsnfvbuild ../release/opnfv/fuel-plugin-ovsnfv*.rpm fuel-plugin-ovsnfv*.rpm
+       @rm -f .ovsnfvbuild ../release/opnfv/fuel-plugin-ovsnfv-*.rpm fuel-plugin-ovsnfv-*.rpm
        @rm -f $(BUILD_BASE)/gitinfo_ovsnfv-dpdk-plugin.txt gitinfo_ovsnfv-dpdk-plugin.txt
 
 .PHONY: release
 release:.ovsnfvbuild
-       @rm -f ../release/opnfv/fuel-plugin-ovsnfv*.rpm
+       @rm -f ../release/opnfv/fuel-plugin-ovsnfv-*.rpm
        @mkdir -p ../release/opnfv
        @cp fuel-plugin-ovsnfv*.rpm ../release/opnfv/
        cp gitinfo_ovsnfv-dpdk-plugin.txt $(BUILD_BASE)
-       cd $(BUILD_BASE) && mkdir -p ../deploy/templates/plugins && cp -rf $(TOP)/config/* ../deploy/templates/plugins
 
 .ovsnfvbuild:
-       @rm -rf fuel-plugin-ovsnfv
-       sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev
-       sudo pip install fuel-plugin-builder
-       git clone $(OVSNFV_DPDK_REPO)
-       cd fuel-plugin-ovsnfv; \
+       @rm -rf ovsnfv
+       git clone $(OVSNFV_DPDK_REPO) ovsnfv
+       cd ovsnfv; \
        git checkout $(OVSNFV_DPDK_BRANCH); \
        if [ ! -z $(OVSNFV_DPDK_CHANGE) ]; then \
           git fetch $(OVSNFV_DPDK_REPO) $(OVSNFV_DPDK_CHANGE); \
           git checkout FETCH_HEAD; \
        fi
-       INCLUDE_DEPENDENCIES=true fpb --debug --build fuel-plugin-ovsnfv/
-       @mv fuel-plugin-ovsnfv/fuel-plugin-ovsnfv*.rpm .
+       cd ovsnfv; \
+       INCLUDE_DEPENDENCIES=true fpb --debug --build $(OVSNFV_DPDK_DIR)
+       @mv ovsnfv/$(OVSNFV_DPDK_DIR)/fuel-plugin-ovsnfv*.rpm .
        $(REPOINFO) -r . > gitinfo_ovsnfv-dpdk-plugin.txt
-       @rm -rf fuel-plugin-ovsnfv
+       @rm -rf ovsnfv
        @touch .ovsnfvbuild
+       # Store artifact in cache straight away if caching is enabled
+       # (no .cacheid will be present unless this is a cached build)
+       test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
 
 #############################################################################
 # Cache operations - only used when building through ci/build.sh