stx-gui: put starlingx specific files to right pythonpath
[pti/rtp.git] / meta-stx / recipes-core / stx-gui / stx-gui.bb
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 DESCRIPTION = "stx-gui"
17
18 PACKAGES = "starlingx-dashboard"
19
20 PROTOCOL = "https"
21 BRANCH = "r/stx.3.0"
22 SRCREV = "d1c22e49a95f92e91049b96f44e685f46785977c"
23 S = "${WORKDIR}/git"
24 PV = "1.0.0"
25
26 LICENSE = "Apache-2.0"
27
28 LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
29
30
31
32 SRC_URI = "git://opendev.org/starlingx/gui.git;protocol=${PROTOCOL};rev=${SRCREV};branch=${BRANCH}"
33
34 inherit distutils python-dir
35
36 DEPENDS = "\
37         python \
38         python-pbr-native \
39         "
40
41 RDEPENDS_starlingx-dashboard += " \
42         python-django-horizon \
43         "
44
45 RDEPENDS_starlingx-dashboard_append = " \
46         ${PYTHON_PN}-cephclient \
47         "
48
49 do_configure () {
50         cd ${S}/starlingx-dashboard/starlingx-dashboard
51         distutils_do_configure
52 }
53
54
55 do_compile () {
56         cd ${S}/starlingx-dashboard/starlingx-dashboard
57         distutils_do_compile
58 }
59
60
61 do_install () {
62         cd ${S}/starlingx-dashboard/starlingx-dashboard
63         distutils_do_install
64
65         install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
66         install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx/
67         install -d -m 0755 ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
68         cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/enabled/* \
69                         ${D}/${datadir}/openstack-dashboard/openstack_dashboard/enabled/
70         cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/themes/starlingx/* \
71                         ${D}/${datadir}/openstack-dashboard/openstack_dashboard/themes/starlingx/
72         cp -ra ${D}${PYTHON_SITEPACKAGES_DIR}/starlingx_dashboard/local/local_settings.d/* \
73                         ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d
74         # comment out this line with syntax error
75         sed -i -e 's|^OPENSTACK_NEUTRON_NETWORK|# &|' \
76                         ${D}/${datadir}/openstack-dashboard/openstack_dashboard/local/local_settings.d/_30_stx_local_settings.py
77 }
78
79 FILES_starlingx-dashboard = " \
80         ${PYTHON_SITEPACKAGES_DIR} \
81         ${datadir}/openstack-dashboard/openstack_dashboard \
82         "