Makefile revision 4878
2521N/A#
2521N/A# CDDL HEADER START
2521N/A#
2521N/A# The contents of this file are subject to the terms of the
2521N/A# Common Development and Distribution License (the "License").
2521N/A# You may not use this file except in compliance with the License.
2521N/A#
2521N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2521N/A# or http://www.opensolaris.org/os/licensing.
2521N/A# See the License for the specific language governing permissions
2521N/A# and limitations under the License.
2521N/A#
2521N/A# When distributing Covered Code, include this CDDL HEADER in each
2521N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2521N/A# If applicable, add the following below this CDDL HEADER, with the
2521N/A# fields enclosed by brackets "[]" replaced with your own identifying
2521N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2521N/A#
2521N/A# CDDL HEADER END
2521N/A#
2521N/A
2521N/A#
3699N/A# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2521N/A#
3998N/A
2521N/Ainclude ../../../make-rules/shared-macros.mk
3998N/Ainclude ../../../make-rules/shared-targets.mk
3998N/A
3998N/APATCH_EACH_ARCHIVE = 1
2521N/A
2521N/ACOMPONENT_NAME= horizon
3998N/ACOMPONENT_CODENAME= juno
3998N/ACOMPONENT_VERSION= 2014.2.2
3998N/ACOMPONENT_BE_VERSION= 2014.2
2521N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2521N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2521N/ACOMPONENT_ARCHIVE_HASH= \
3998N/A sha256:f639cdb8fc7fd26725d689d42c426f09bbd5a77554910800b1315f182879558e
2521N/ACOMPONENT_ARCHIVE_URL= http://launchpad.net/$(COMPONENT_NAME)/$(COMPONENT_CODENAME)/$(COMPONENT_VERSION)/+download/$(COMPONENT_ARCHIVE)
3533N/ACOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).asc
2521N/ACOMPONENT_PROJECT_URL= http://www.openstack.org/
3998N/ACOMPONENT_BUGDB= service/horizon
3998N/AIPS_COMPONENT_VERSION= 0.$(COMPONENT_VERSION)
3998N/ACOMPONENT_PATCHES= \
3998N/A 01-osprofiler.patch \
3998N/A 02-change-angular-imports.patch \
3998N/A 03-remove-qunit.patch \
3998N/A 04-remove-jasmine.patch \
3998N/A 05-disable-unsupported-bootsource.patch \
3998N/A 06-remove-security-groups.patch \
4010N/A 07-remove-image-source.patch \
4010N/A 08-_get_reachable_subnets.patch \
3998N/A 11-requirements.patch
3998N/A
3998N/ATPNO_HORIZON= 21822
3998N/ATPNO_ANGULAR= 21640
3998N/ATPNO_BOOTSTRAP_DP= 20670
3998N/ATPNO_BOOTSTRAP_SCSS= 20671
3998N/ATPNO_D3= 20822
3998N/ATPNO_FONT_AWESOME= 21641
3998N/ATPNO_HOGAN= 21827
3998N/ATPNO_JQUERY= 21642
3998N/ATPNO_JQUERY_MIGRATE= 13315
3998N/ATPNO_JQUERY_UI= 18416
3998N/ATPNO_JQUERY_QUICKSEARCH=20396
3998N/ATPNO_JQUERY_TABLESORTER=20824
3998N/ATPNO_JSENCRYPT= 20397
3998N/ATPNO_RICKSHAW= 20673
3998N/ATPNO_SPIN= 20674
3998N/A
3998N/A#
3998N/A# Starting with Juno, Horizon depends on a number of XStatic modules
3998N/A# to deliver the required JavaScript modules. This delivery method
3998N/A# may be changing in future releases, so the XStatic modules for now
3998N/A# are built as part of Horizon rather than being stand alone
4194N/A# components/packages.
3998N/A#
3998N/A# XStatic itself is only used during the build process and so while it
3998N/A# is downloaded and installed in the proto area, none of its
3998N/A# components are delivered in the Horizon package itself.
3998N/A#
3998N/ACOMPONENT_NAME_1 = XStatic
3998N/AVERSION_XSTATIC = 1.0.1
4194N/ACOMPONENT_SRC_1 = XStatic-$(VERSION_XSTATIC)
4194N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_1 = \
3998N/A sha256:0ec93d7c66ebb9e0d31b664753437dc8634cb66e13310cb47c9eb1e0bc66d726
3998N/ACOMPONENT_ARCHIVE_URL_1 = $(call pypi_url,1)
3998N/A
3998N/ACOMPONENT_NAME_2 = XStatic-Angular
3998N/AVERSION_ANGULAR = 1.3.7.0
4194N/ACOMPONENT_SRC_2 = XStatic-Angular-$(VERSION_ANGULAR)
4194N/ACOMPONENT_ARCHIVE_2 = $(COMPONENT_SRC_2).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_2 = \
3998N/A sha256:7cad216b226399cbe8d2909ed5b9f28d724907b9c9e1e078e6e25d320a3d5dd7
3998N/ACOMPONENT_ARCHIVE_URL_2 = $(call pypi_url,2)
3998N/APKG_MACROS += VERSION_ANGULAR=$(VERSION_ANGULAR)
3998N/A
3998N/ACOMPONENT_NAME_3 = XStatic-Bootstrap-Datepicker
3998N/AVERSION_BOOTSTRAP_DP= 1.3.1.0
4194N/ACOMPONENT_SRC_3 = XStatic-Bootstrap-Datepicker-$(VERSION_BOOTSTRAP_DP)
4194N/ACOMPONENT_ARCHIVE_3 = $(COMPONENT_SRC_3).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_3 = \
3998N/A sha256:9edc9b77501001fcee9fbf4bf0a722c263efd928ef928b40081a8269fdd9a944
3998N/ACOMPONENT_ARCHIVE_URL_3 = $(call pypi_url,3)
3998N/APKG_MACROS += VERSION_BOOTSTRAP_DP=$(VERSION_BOOTSTRAP_DP)
3998N/A
3998N/ACOMPONENT_NAME_4 = XStatic-Bootstrap-SCSS
3998N/AVERSION_BOOTSTRAP_SCSS= 3.2.0.0
4194N/ACOMPONENT_SRC_4 = XStatic-Bootstrap-SCSS-$(VERSION_BOOTSTRAP_SCSS)
4194N/ACOMPONENT_ARCHIVE_4 = $(COMPONENT_SRC_4).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_4 = \
3998N/A sha256:7e9858737e2e6aac921ec7a3fca627e522901c3061611e154ebc0b8a892c7018
3998N/ACOMPONENT_ARCHIVE_URL_4 = $(call pypi_url,4)
3998N/APKG_MACROS += VERSION_BOOTSTRAP_SCSS=$(VERSION_BOOTSTRAP_SCSS)
2521N/A
3998N/ACOMPONENT_NAME_5 = XStatic-D3
3998N/AVERSION_D3 = 3.1.6.2
4194N/ACOMPONENT_SRC_5 = XStatic-D3-$(VERSION_D3)
4194N/ACOMPONENT_ARCHIVE_5 = $(COMPONENT_SRC_5).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_5 = \
3998N/A sha256:46fe521f8dad99f5e20f6702180510c37b81d11f1d78119d308fcec31381f90e
3998N/ACOMPONENT_ARCHIVE_URL_5 = $(call pypi_url,5)
3998N/APKG_MACROS += VERSION_D3=$(VERSION_D3)
3998N/A
3998N/ACOMPONENT_NAME_6 = XStatic-Font-Awesome
3998N/AVERSION_FONT_AWESOME = 4.2.0.0
4194N/ACOMPONENT_SRC_6 = XStatic-Font-Awesome-$(VERSION_FONT_AWESOME)
4194N/ACOMPONENT_ARCHIVE_6 = $(COMPONENT_SRC_6).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_6 = \
3998N/A sha256:b7fdbf1ed316f3a207eeb9ee1c052820e55b4e31d247d81c8ea059e21f555a73
3998N/ACOMPONENT_ARCHIVE_URL_6 = $(call pypi_url,6)
3998N/APKG_MACROS += VERSION_FONT_AWESOME=$(VERSION_FONT_AWESOME)
3998N/A
3998N/ACOMPONENT_NAME_7 = XStatic-Hogan
3998N/AVERSION_HOGAN = 2.0.0.2
4194N/ACOMPONENT_SRC_7 = XStatic-Hogan-$(VERSION_HOGAN)
4194N/ACOMPONENT_ARCHIVE_7 = $(COMPONENT_SRC_7).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_7 = \
3998N/A sha256:5941bc7fb2a09916b8837848e6fc2a13b2dfc271811e9b522c61e1337d5fc2bd
3998N/ACOMPONENT_ARCHIVE_URL_7 = $(call pypi_url,7)
3998N/APKG_MACROS += VERSION_HOGAN=$(VERSION_HOGAN)
3998N/A
3998N/ACOMPONENT_NAME_8 = XStatic-jQuery
3998N/AVERSION_JQUERY = 1.10.2.1
4194N/ACOMPONENT_SRC_8 = XStatic-jQuery-$(VERSION_JQUERY)
4194N/ACOMPONENT_ARCHIVE_8 = $(COMPONENT_SRC_8).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_8 = \
3998N/A sha256:83416a6bb86e8534858c4d1ddca45e881c87639da6f78000c28c3a193fe91305
3998N/ACOMPONENT_ARCHIVE_URL_8 = $(call pypi_url,8)
3998N/APKG_MACROS += VERSION_JQUERY=$(VERSION_JQUERY)
3998N/A
3998N/ACOMPONENT_NAME_9 = XStatic-JQuery-Migrate
3998N/AVERSION_JQUERY_MIGRATE= 1.2.1.1
4194N/ACOMPONENT_SRC_9 = XStatic-JQuery-Migrate-$(VERSION_JQUERY_MIGRATE)
4194N/ACOMPONENT_ARCHIVE_9 = $(COMPONENT_SRC_9).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_9 = \
3998N/A sha256:e2959b3df49afdddb00d36b74cca727a91b994b9f4edb993d7264731a750900e
3998N/ACOMPONENT_ARCHIVE_URL_9 = $(call pypi_url,9)
3998N/APKG_MACROS += VERSION_JQUERY_MIGRATE=$(VERSION_JQUERY_MIGRATE)
3998N/A
3998N/ACOMPONENT_NAME_10 = XStatic-jquery-ui
3998N/AVERSION_JQUERY_UI = 1.11.0.1
4194N/ACOMPONENT_SRC_10 = XStatic-jquery-ui-$(VERSION_JQUERY_UI)
4194N/ACOMPONENT_ARCHIVE_10 = $(COMPONENT_SRC_10).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_10 = \
3998N/A sha256:099b1836eb0d91b8dc98f5b8a6b856a2631d43af0d47f33ef90ee72ed37bda58
3998N/ACOMPONENT_ARCHIVE_URL_10 = $(call pypi_url,10)
3998N/APKG_MACROS += VERSION_JQUERY_UI=$(VERSION_JQUERY_UI)
3998N/A
3998N/ACOMPONENT_NAME_11 = XStatic-JQuery.quicksearch
3998N/AVERSION_JQUERY_QS = 2.0.3.1
4194N/ACOMPONENT_SRC_11 = XStatic-JQuery.quicksearch-$(VERSION_JQUERY_QS)
4194N/ACOMPONENT_ARCHIVE_11 = $(COMPONENT_SRC_11).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_11 = \
3998N/A sha256:1271571b420417add56c274fd935e81bfc79e0d54a03559d6ba5ef369f358477
3998N/ACOMPONENT_ARCHIVE_URL_11 = $(call pypi_url,11)
3998N/APKG_MACROS += VERSION_JQUERY_QS=$(VERSION_JQUERY_QS)
3998N/A
3998N/ACOMPONENT_NAME_12 = XStatic-JQuery.TableSorter
3998N/AVERSION_JQUERY_TS = 2.14.5.1
4194N/ACOMPONENT_SRC_12 = XStatic-JQuery.TableSorter-$(VERSION_JQUERY_TS)
4194N/ACOMPONENT_ARCHIVE_12 = $(COMPONENT_SRC_12).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_12 = \
3998N/A sha256:3ba24aecd9a3dc71a79dd4096fa5a8a041c3a7b892c61d05e6e46de0605070f0
3998N/ACOMPONENT_ARCHIVE_URL_12 = $(call pypi_url,12)
3998N/APKG_MACROS += VERSION_JQUERY_TS=$(VERSION_JQUERY_TS)
3998N/A
3998N/ACOMPONENT_NAME_13 = XStatic-JSEncrypt
3998N/AVERSION_JSENCRYPT = 2.0.0.2
4194N/ACOMPONENT_SRC_13 = XStatic-JSEncrypt-$(VERSION_JSENCRYPT)
4194N/ACOMPONENT_ARCHIVE_13 = $(COMPONENT_SRC_13).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_13 = \
3998N/A sha256:5852892afc6f80c7848f4110b6dad190a54aeb908271d67aaeae9d966f4a26b5
3998N/ACOMPONENT_ARCHIVE_URL_13 = $(call pypi_url,13)
3998N/APKG_MACROS += VERSION_JSENCRYPT=$(VERSION_JSENCRYPT)
3998N/A
3998N/ACOMPONENT_NAME_14 = XStatic-Rickshaw
3998N/AVERSION_RICKSHAW = 1.5.0.0
4194N/ACOMPONENT_SRC_14 = XStatic-Rickshaw-$(VERSION_RICKSHAW)
4194N/ACOMPONENT_ARCHIVE_14 = $(COMPONENT_SRC_14).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_14 = \
3998N/A sha256:147574228757254442700a9eea5150f14acb1224ef0612f896b663ab58406de8
3998N/ACOMPONENT_ARCHIVE_URL_14 = $(call pypi_url,14)
3998N/APKG_MACROS += VERSION_RICKSHAW=$(VERSION_RICKSHAW)
3998N/A
3998N/ACOMPONENT_NAME_15 = XStatic-Spin
3998N/AVERSION_SPIN = 1.2.5.2
4194N/ACOMPONENT_SRC_15 = XStatic-Spin-$(VERSION_SPIN)
4194N/ACOMPONENT_ARCHIVE_15 = $(COMPONENT_SRC_15).tar.gz
3998N/ACOMPONENT_ARCHIVE_HASH_15 = \
3998N/A sha256:7f46ef0e45e047019ba6eda22c432fb96f681b97bbe7f1749aa9209e07727192
3998N/ACOMPONENT_ARCHIVE_URL_15 = $(call pypi_url,15)
3998N/APKG_MACROS += VERSION_SPIN=$(VERSION_SPIN)
2899N/A
3817N/Ainclude $(WS_MAKE_RULES)/prep.mk
3817N/Ainclude $(WS_MAKE_RULES)/setup.py.mk
3817N/Ainclude $(WS_MAKE_RULES)/ips.mk
2521N/A
2521N/AASLR_MODE = $(ASLR_NOT_APPLICABLE)
2521N/A
2521N/A# Since this is an app, and doesn't provide any public library interfaces, we
2521N/A# only need to deliver one version. The manifest is parameterized, though.
4049N/APYTHON_VERSIONS= 2.7
3998N/A
4010N/APKG_MACROS += COMPONENT_BE_VERSION=$(COMPONENT_BE_VERSION)
2521N/APKG_MACROS += PYVER=$(PYTHON_VERSIONS)
3998N/APKG_MACROS += PYV=$(shell echo $(PYTHON_VERSIONS) | tr -d .)
2521N/A
3998N/APROTO_PYTHON_LIB = $(PROTO_DIR)$(PYTHON_LIB)
3998N/A
3998N/A# Copy the Oracle branding files and Django app customizations into place
3998N/ACOMPONENT_POST_INSTALL_ACTION += \
3998N/A ($(MKDIR) $(PROTO_PYTHON_LIB)/openstack_dashboard/templates/solaris; \
3998N/A $(CP) files/branding/css/solaris.css \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard/static/dashboard/css; \
3998N/A $(CP) files/branding/img/* \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard/static/dashboard/img; \
3998N/A $(CP) files/branding/theme/_stylesheets.html \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard/templates/solaris; \
3998N/A $(CP) files/overrides.py $(PROTO_PYTHON_LIB)/openstack_dashboard);
3998N/A
3998N/A# Generate .pyc files for the files in the proto directory
3998N/ACOMPONENT_POST_INSTALL_ACTION += \
3998N/A $(PYTHON) -m compileall $(PROTO_PYTHON_LIB);
3998N/A
3998N/A# Collect the JavaScript files and compress the static assets
2521N/ACOMPONENT_POST_INSTALL_ACTION += \
3998N/A (set -e; $(CP) $(SOURCE_DIR)/manage.py \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard; \
3998N/A $(TOUCH) $(PROTO_PYTHON_LIB)/xstatic/__init__.py; \
3998N/A $(TOUCH) $(PROTO_PYTHON_LIB)/xstatic/pkg/__init__.py; \
3998N/A cd $(PROTO_PYTHON_LIB)/openstack_dashboard; \
3998N/A $(ENV) PYTHONPATH=$(PROTO_PYTHON_LIB) ./manage.py \
3998N/A collectstatic --noinput; \
3998N/A $(ENV) PYTHONPATH=$(PROTO_PYTHON_LIB) ./manage.py compress --force; \
3998N/A $(CP) -R $(PROTO_PYTHON_LIB)/static \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard; \
3998N/A $(RM) -r \
3998N/A $(PROTO_PYTHON_LIB)/XStatic* \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard/local/.secret_key_store \
3998N/A $(PROTO_PYTHON_LIB)/openstack_dashboard/manage.py \
3998N/A $(PROTO_PYTHON_LIB)/static \
3998N/A $(PROTO_PYTHON_LIB)/xstatic); (( $$? )) && exit 1;
3998N/A
3998N/A# Patch openstack_dashboard/settings.py to remove the xstatic imports
3998N/A# and use. This is done after 'gmake prep' because we need the
3998N/A# xstatic imports for static asset collection.
3998N/ACOMPONENT_POST_INSTALL_ACTION += \
3998N/A $(GPATCH) -d $(PROTO_DIR) $(GPATCH_FLAGS) \
4194N/A < patches/99-remove.xstatic.patch-proto
3998N/A
3998N/A#
3998N/A# The xstatic target builds each XStatic component alongside Horizon.
3998N/A# This is done because the Django script which collects
3998N/A# the JavaScript libraries and compresses the static assets
3998N/A# (manage.py) requires the packages be "installed". Rather than
3998N/A# forcing a CBE update for any revision of any XStatic module, we use
3998N/A# what's specified above.
3998N/A#
3998N/A# This extra work is done at package build time rather than when the
3998N/A# application runs because a) compressing the assets ahead of time
3998N/A# makes things faster and b) this allows the package to be entirely
3998N/A# contained in /usr rather than having a separate spot in /var for the
3998N/A# webservd user to write compressed assets to as they get used.
3998N/A#
3998N/A.PHONY: xstatic
3998N/Axstatic: $(PROTO_DIR) build
3998N/A for xs_archive in $$(ls -d XStatic-* | grep -v .tar.gz); do \
3998N/A cd $$xs_archive; \
3998N/A $(ENV) $(PYTHON.$(BITS)) ./setup.py build; \
3998N/A $(ENV) $(PYTHON.$(BITS)) ./setup.py install \
3998N/A --force \
3998N/A --install-data=$(PYTHON_DATA) \
3998N/A --install-lib=$(PYTHON_LIB) \
3998N/A --install-platlib=$(PYTHON_LIB) \
3998N/A --install-purelib=$(PYTHON_LIB) \
3998N/A --root $(PROTO_DIR); \
3998N/A cd ../; \
3998N/A done
3998N/A
2521N/A# common targets
2521N/Abuild: $(BUILD_NO_ARCH)
2521N/A
3998N/A# make sure all of the xstatic modules are built
3998N/Ainstall: $(INSTALL_NO_ARCH) xstatic
2521N/A
2521N/Atest: $(NO_TESTS)
2521N/A
4337N/Asystem-test: $(NO_TESTS)
4337N/A
3998N/Aclean::
3998N/A gfind $(COMPONENT_DIR) -maxdepth 1 -type d -name "XStatic*" \
3998N/A -exec rm -r {} \;
2521N/A
3998N/A
3998N/A# Packages required by Django's manage.py during the Horizon build
4049N/AREQUIRED_PACKAGES += library/python/babel-27
4049N/AREQUIRED_PACKAGES += library/python/ceilometerclient-27
4049N/AREQUIRED_PACKAGES += library/python/cinderclient-27
4049N/AREQUIRED_PACKAGES += library/python/django-27
4049N/AREQUIRED_PACKAGES += library/python/django-pyscss-27
4049N/AREQUIRED_PACKAGES += library/python/django_compressor-27
4049N/AREQUIRED_PACKAGES += library/python/django_openstack_auth-27
4049N/AREQUIRED_PACKAGES += library/python/glanceclient-27
4049N/AREQUIRED_PACKAGES += library/python/heatclient-27
4049N/AREQUIRED_PACKAGES += library/python/iso8601-27
4049N/AREQUIRED_PACKAGES += library/python/keystoneclient-27
4049N/AREQUIRED_PACKAGES += library/python/lockfile-27
4049N/AREQUIRED_PACKAGES += library/python/neutronclient-27
4049N/AREQUIRED_PACKAGES += library/python/novaclient-27
4049N/AREQUIRED_PACKAGES += library/python/oslo.config-27
4049N/AREQUIRED_PACKAGES += library/python/requests-27
4049N/AREQUIRED_PACKAGES += library/python/saharaclient-27
4049N/AREQUIRED_PACKAGES += library/python/six-27
4049N/AREQUIRED_PACKAGES += library/python/swiftclient-27
4049N/AREQUIRED_PACKAGES += library/python/troveclient-27