-##################
-# NETWORKING-VPP #
-##################
-
-$(BUILD_DIR)/python-networking-vpp.tar.gz:
- @echo "Preparing the networking-vpp RPM prerequisites"
- git clone $(NETVPP_REPO) $(BUILD_DIR)/python-networking-vpp-$(NETVPP_VERS)
- tar czf $(BUILD_DIR)/python-networking-vpp.tar.gz -C $(BUILD_DIR) python-networking-vpp-$(NETVPP_VERS)
-
-.PHONY: networking-vpp-rpm
-networking-vpp-rpm: $(BUILD_DIR)/noarch/python-networking-vpp-*.noarch.rpm
-
-$(BUILD_DIR)/noarch/python-networking-vpp-*.noarch.rpm: $(BUILD_DIR)/python-networking-vpp.tar.gz
- @echo "Building the Networking VPP RPM"
- rpmbuild --clean -ba --target noarch rpm_specs/networking-vpp.spec $(RPM_DIR_ARGS) -D 'git .git$(NETVPP_COMMIT)'
-
-###############
-# UNDERCLOUD #
-###############
-
-.PHONY: undercloud
-undercloud: $(BUILD_DIR)/undercloud.qcow2
-
-$(BUILD_DIR)/undercloud.qcow2:
- @echo "Building the Apex Undercloud Image"
- @./undercloud.sh
-
-$(BUILD_DIR)/opnfv-apex-undercloud.tar.gz: $(BUILD_DIR)/undercloud.qcow2
- @echo "Preparing the Apex Undercloud RPM prerequisites"
- pushd ../ && git archive --format=tar --prefix=opnfv-apex-undercloud-$(RPMVERS)/ HEAD > $(BUILD_DIR)/opnfv-apex-undercloud.tar
- tar -rf $(BUILD_DIR)/opnfv-apex-undercloud.tar \
- --xform="s:.*undercloud.qcow2:opnfv-apex-undercloud-$(RPMVERS)/build/undercloud.qcow2:" $(BUILD_DIR)/undercloud.qcow2
- gzip -f $(BUILD_DIR)/opnfv-apex-undercloud.tar
-
-.PHONY: undercloud-rpm-check
-undercloud-rpm-check: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-.PHONY: undercloud-rpm
-undercloud-rpm: $(BUILD_DIR)/opnfv-apex-undercloud.tar.gz $(RPMUDR)
-
-$(RPMUDR):
- @echo "Building the Apex Undercloud RPM"
- rpmbuild --clean -ba rpm_specs/opnfv-apex-undercloud.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-###############
-# OVERCLOUD #
-###############
-
-.PHONY: overcloud-full
-overcloud-full: $(BUILD_DIR)/overcloud-full.qcow2
-
-$(BUILD_DIR)/overcloud-full.qcow2: $(BUILD_DIR)/noarch/python-networking-vpp-*.noarch.rpm
- @echo "Building the Apex Base Overcloud Image"
- @./overcloud-full.sh
-
-###############
-# ODL #
-###############
-
-.PHONY: overcloud-opendaylight
-overcloud-opendaylight: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
-
-$(BUILD_DIR)/overcloud-full-opendaylight.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
- @echo "Building the Apex OpenDaylight Overcloud Image"
- @./overcloud-opendaylight.sh
-
-$(BUILD_DIR)/opnfv-apex.tar.gz: $(BUILD_DIR)/overcloud-full-opendaylight.qcow2
- tar -czf $(BUILD_DIR)/opnfv-apex.tar.gz --xform="s:.*/:opnfv-apex-$(RPMVERS)/build/:" $(BUILD_DIR)/overcloud-full-opendaylight.qcow2 $(BUILD_DIR)/overcloud-full.initrd $(BUILD_DIR)/overcloud-full.vmlinuz
-
-.PHONY: opendaylight-rpm-check
-opendaylight-rpm-check: $(BUILD_DIR)/opnfv-apex.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-.PHONY: opendaylight-rpm
-opendaylight-rpm: $(BUILD_DIR)/opnfv-apex.tar.gz $(RPMODL)
-
-$(RPMODL):
- @echo "Building the Apex OpenDaylight RPM"
- # build the overcloud RPM
- rpmbuild --clean -ba rpm_specs/opnfv-apex.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-###############
-# ONOS #
-###############
-
-.PHONY: overcloud-onos
-overcloud-onos: $(BUILD_DIR)/overcloud-full-onos.qcow2
-
-$(BUILD_DIR)/overcloud-full-onos.qcow2: $(BUILD_DIR)/overcloud-full.qcow2
- @echo "Building the Apex ONOS Overcloud Image"
- @./overcloud-onos.sh
-
-$(BUILD_DIR)/opnfv-apex-onos.tar.gz: $(BUILD_DIR)/overcloud-full-onos.qcow2
- tar -czf $(BUILD_DIR)/opnfv-apex-onos.tar.gz --xform="s:.*/:opnfv-apex-onos-$(RPMVERS)/build/:" $(BUILD_DIR)/overcloud-full-onos.qcow2
-
-.PHONY: onos-rpm-check
-onos-rpm-check: $(BUILD_DIR)/opnfv-apex-onos.tar.gz
- rpmbuild --clean -bi -bl rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-.PHONY: onos-rpm
-onos-rpm: $(BUILD_DIR)/opnfv-apex-onos.tar.gz $(RPMONO)
-
-$(RPMONO):
- @echo "Building the Apex ONOS RPM"
- # build the overcloud RPM
- rpmbuild --clean -ba rpm_specs/opnfv-apex-onos.spec $(RPM_DIR_ARGS) -D "_release $(shell echo $(RELEASE) | tr -d '_-')"
-
-###############
-# ISO #
-###############
-
-$(CENTISO):
- curl $(CENTDNLD) -z $(CENTISO) -o $(CENTISO) --verbose --silent --location
-
-iso-clean:
- @rm -Rf $(BUILD_DIR)/centos
- @rm -Rf $(BUILD_DIR)/release
- @rm -f $(ISO)
-
-.PHONY: mount-centiso umount-centiso
-mount-centiso: $(CENTISO)
- @echo "Mounting CentOS ISO in $(CENTDIR)"
- @mkdir -p $(CENTDIR)
- @fuseiso $(CENTISO) $(CENTDIR)
-
-umount-centiso:
- @set +e
- @echo "Unmounting CentOS ISO from $(CENTDIR)"
- @fusermount -u $(CENTDIR)
- @rmdir $(CENTDIR)
- @set -e
-
-.PHONY: iso
-iso: iso-clean images rpms $(CENTISO)
- @echo "Building the Apex ISO"
- @mkdir $(BUILD_DIR)/centos $(BUILD_DIR)/release
- cd $(BUILD_DIR)/centos && bsdtar -xf ../$(shell basename $(CENTISO))
- # modify the installer iso's contents
- @chmod -R u+w $(BUILD_DIR)/centos
- @cp -f isolinux.cfg $(BUILD_DIR)/centos/isolinux/isolinux.cfg
- @ln $(RPMCOM) $(BUILD_DIR)/centos/Packages
- @ln $(RPMUDR) $(BUILD_DIR)/centos/Packages
- @ln $(RPMODL) $(BUILD_DIR)/centos/Packages
- # add packages to the centos packages
- cd $(BUILD_DIR)/centos/Packages && yumdownloader openvswitch jq python34 python34-libs python34-PyYAML python34-setuptools ipxe-roms-qemu python34-jinja2 python34-markupsafe python2-virtualbmc python-pbr python-prettytable python-pyghmi python-crypto libvirt-python
- cd $(BUILD_DIR)/centos/Packages && curl -O http://artifacts.opnfv.org/apex/dependencies/python3-ipmi-0.3.0-1.noarch.rpm
- # regenerate yum repo data
- @echo "Generating new yum metadata"
- createrepo --update -g $(BUILD_ROOT)/c7-opnfv-x86_64-comps.xml $(BUILD_DIR)/centos
- # build the iso
- @echo "Building OPNFV iso"
- mkisofs -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -V "OPNFV CentOS 7 x86_64" -R -J -v -T -o $(ISO) $(BUILD_DIR)/centos
- isohybrid $(ISO)
- @printf "\n\nISO is built at $(ISO)\n\n"
-
-##################
-# Quagga Clean #
-##################
-.PHONY: quagga-clean
-quagga-clean:
- @rm -rf $(QUAGGA_BUILD_DIR)
- @sudo yum -y remove zrpc* quagga* c-capnproto* thrift*
-
-#################
-# Quagga+ZRPC #
-#################
-.PHONY: quagga-zrpc
-quagga-zrpc: quagga-clean thrift-rpm capnproto-rpm quagga-rpm zrpc-rpm
-
-##########
-# ZRPC #
-##########
-.PHONY: zrpc-rpm
-zrpc-rpm: quagga-rpm $(QUAGGA_RPMS_DIR)/zrpcd-%.x86_64.rpm
-
-$(QUAGGA_RPMS_DIR)/zrpcd-%.x86_64.rpm:
- @echo "Building ZRPC RPM"
- @./build_quagga.sh -a zrpc
-
-############
-# Quagga #
-############
-.PHONY: quagga-rpm
-quagga-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/quagga-1.1.0_%.el7.centos.x86_64.rpm
-
-$(QUAGGA_RPMS_DIR)/RPMS/x86_64/quagga-1.1.0_%.el7.centos.x86_64.rpm:
- @echo "Building Quagga RPM"
- @./build_quagga.sh -a quagga
-
-###############
-# Capnproto #
-###############
-.PHONY: capnproto-rpm
-capnproto-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/c-capnproto-%.x86_64.rpm
-
-$(QUAGGA_RPMS_DIR)/RPMS/x86_64/c-capnproto-%.x86_64.rpm:
- @echo "Building capnproto RPMs"
- @./build_quagga.sh -a capnproto
-
-############
-# Thrift #
-############
-
-.PHONY: thrift-rpm
-thrift-rpm: $(QUAGGA_RPMS_DIR)/RPMS/x86_64/thrift-%.x86_64.rpm
-
-$(QUAGGA_RPMS_DIR)/RPMS/x86_64/thrift-%.x86_64.rpm:
- @echo "Building Thrift RPMs"
- @./build_quagga.sh -a thrift