summaryrefslogtreecommitdiffstats
path: root/build/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile57
1 files changed, 40 insertions, 17 deletions
diff --git a/build/Makefile b/build/Makefile
index a542279b..88a6e962 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -14,8 +14,9 @@ export RELEASE = "0"
export ISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${RELEASE}.iso
export RPM_DIST = $(shell rpm -E %dist)
-export TACKER_REPO = "http://github.com/trozet/tacker"
-export TACKER_BRANCH = "SFC_colorado"
+
+export TACKER_REPO := $(shell awk -F\= '/^tacker_repo/ {print $$2}' variables.sh )
+export TACKER_BRANCH := $(shell awk -F\= '/^tacker_branch/ {print $$2}' variables.sh )
export TACKER_COMMIT := $(shell git ls-remote $(TACKER_REPO) $(TACKER_BRANCH) | awk '{print substr($$1,1,7)}')
export TACKERCLIENT_REPO := $(shell awk -F\= '/^tackerclient_repo/ {print $$2}' variables.sh )
@@ -31,7 +32,9 @@ export NETVPP_REPO := $(shell awk -F\= '/^netvpp_repo/ {print $$2}' variables.sh
export NETVPP_BRANCH := $(shell awk -F\= '/^netvpp_branch/ {print $$2}' variables.sh )
export NETVPP_COMMIT := $(shell git ls-remote $(NETVPP_REPO) $(NETVPP_BRANCH) | awk '{print substr($$1,1,7)}')
+export RELRPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex-release.spec | head -n 1 | awk '{ print $$2 }')
export RPMVERS = $(shell grep Version $(shell pwd)/rpm_specs/opnfv-apex.spec | head -n 1 | awk '{ print $$2 }')
+export RPMREL = $(shell pwd)/noarch/opnfv-apex-release-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMCOM = $(shell pwd)/noarch/opnfv-apex-common-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMUDR = $(shell pwd)/noarch/opnfv-apex-undercloud-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
export RPMODL = $(shell pwd)/noarch/opnfv-apex-$(RPMVERS)-$(shell echo ${RELEASE} | tr -d '_-').noarch.rpm
@@ -54,13 +57,33 @@ images-clean: undercloud-clean overcloud-full-clean overcloud-opendaylight-clean
rpms: common-rpm undercloud-rpm opendaylight-rpm onos-rpm
.PHONY: rpms-check
-rpms-check: common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
+rpms-check: release-rpm-check common-rpm-check undercloud-rpm-check opendaylight-rpm-check onos-rpm-check
.PHONY: rpms-clean
-rpms-clean: common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean
+rpms-clean: release-rpm-clean common-rpm-clean undercloud-rpm-clean opendaylight-rpm-clean onos-rpm-clean
rm -rf noarch
rm -rf BUILDROOT
+opnfv-apex-release.tar.gz:
+ pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-release-$(RELRPMVERS)/ HEAD > build/opnfv-apex-release.tar.gz
+
+.PHONY: release-rpm-check
+release-rpm-check: opnfv-apex-release.tar.gz
+ rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-release.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
+
+.PHONY: release-rpm
+release-rpm: opnfv-apex-release.tar.gz $(RPMREL)
+
+$(RPMREL):
+ @echo "Building the Apex Release RPM"
+ # build the release RPM
+ rpmbuild --clean -ba rpm_specs/opnfv-apex-release.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D "release $(shell echo $(RELEASE) | tr -d '_-')"
+
+.PHONY: release-rpm-clean
+release-rpm-clean:
+ rm -rf opnfv-apex-release-$(RPMVERS)
+ rm -rf opnfv-apex-release.tar.gz
+
opnfv-apex-common.tar.gz:
pushd ../ && git archive --format=tar.gz --prefix=opnfv-apex-common-$(RPMVERS)/ HEAD > build/opnfv-apex-common.tar.gz
@@ -113,20 +136,20 @@ python-pep8-check:
.PHONY: tacker-clean
tacker-clean:
- rm -rf openstack-tacker-2015.2
+ rm -rf openstack-tacker-2016.2
rm -f openstack-tacker.tar.gz
openstack-tacker.tar.gz:
@echo "Preparing the Tacker RPM prerequisites"
- git clone $(TACKER_REPO) -b $(TACKER_BRANCH) openstack-tacker-2015.2
- tar czf openstack-tacker.tar.gz openstack-tacker-2015.2
+ git clone $(TACKER_REPO) -b $(TACKER_BRANCH) openstack-tacker-2016.2
+ tar czf openstack-tacker.tar.gz openstack-tacker-2016.2
.PHONY: tacker-rpm
-tacker-rpm: openstack-tacker.tar.gz noarch/openstack-tacker-2015.2-1.trozetgit$(TACKER_COMMIT).noarch.rpm
+tacker-rpm: openstack-tacker.tar.gz noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm
-noarch/openstack-tacker-2015.2-1.trozetgit$(TACKER_COMMIT).noarch.rpm:
+noarch/openstack-tacker-2016.2-1.git$(TACKER_COMMIT).noarch.rpm:
@echo "Building the Tacker RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/openstack-tacker.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D 'git .trozetgit$(TACKER_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/openstack-tacker.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D 'git .git$(TACKER_COMMIT)'
#################
# TACKERCLIENT #
@@ -134,20 +157,20 @@ noarch/openstack-tacker-2015.2-1.trozetgit$(TACKER_COMMIT).noarch.rpm:
.PHONY: tackerclient-clean
tackerclient-clean:
- rm -rf python-tackerclient-2015.2
+ rm -rf python-tackerclient-2016.2
rm -f python-tackerclient.tar.gz
python-tackerclient.tar.gz:
@echo "Preparing the TackerClient RPM prerequisites"
- git clone $(TACKERCLIENT_REPO) -b $(TACKERCLIENT_BRANCH) python-tackerclient-2015.2
- tar czf python-tackerclient.tar.gz python-tackerclient-2015.2
+ git clone $(TACKERCLIENT_REPO) -b $(TACKERCLIENT_BRANCH) python-tackerclient-2016.2
+ tar czf python-tackerclient.tar.gz python-tackerclient-2016.2
.PHONY: tackerclient-rpm
-tackerclient-rpm: python-tackerclient.tar.gz noarch/python-tackerclient-2015.2-1.trozetgit$(TACKERCLIENT_COMMIT).noarch.rpm
+tackerclient-rpm: python-tackerclient.tar.gz noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm
-noarch/python-tackerclient-2015.2-1.trozetgit$(TACKERCLIENT_COMMIT).noarch.rpm:
+noarch/python-tackerclient-2016.2-1.git$(TACKERCLIENT_COMMIT).noarch.rpm:
@echo "Building the TackerClient RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/python-tackerclient.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D 'git .trozetgit$(TACKERCLIENT_COMMIT)'
+ rpmbuild --clean -ba --target noarch rpm_specs/python-tackerclient.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)' -D 'git .git$(TACKERCLIENT_COMMIT)'
###############
# CONGRESS #
@@ -252,7 +275,7 @@ overcloud-full-clean:
.PHONY: overcloud-full
overcloud-full: images/overcloud-full.qcow2
-images/overcloud-full.qcow2: congress-rpm networking-vpp-rpm
+images/overcloud-full.qcow2: congress-rpm tacker-rpm networking-vpp-rpm
@echo "Building the Apex Base Overcloud Image"
@./overcloud-full.sh