Fabricio Henrique Ramos 664f9f927b Add debian package for python-horizon
Add debian package for python-horizon.

Story: 2009101
Task: 43740

Signed-off-by: Fabricio Henrique Ramos <fabriciohenrique.ramos@windriver.com>
Change-Id: If8906847a08e2d2ecfd2c721a04d4c0cfe7d8f0c
2021-10-25 10:20:24 -03:00

39 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -x
PKG_BUILD_NAME=$1
PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME})
STX_BASE=$(realpath ${MY_REPO}/stx)
PKG_BASE=$(realpath ${STX_BASE}/upstream/openstack/python-horizon)
PKG_EXTRA_FILES_DIR=$(realpath ${PKG_BASE}/centos/files)
mkdir ${PKG_BUILD_NAME}
# UPSTREAM HORIZON
HORIZON_UPSTREAM_URL='https://salsa.debian.org/openstack-team/services/horizon/-/archive/debian/18.6.2-5/horizon-debian-18.6.2-5.tar.gz'
HORIZON_TAR_BALL='horizon-18.6.2-5.tar.gz'
HORIZON_MD5_SUM='9c41bd3d52c5d5466e622ef8014da0fa'
curl --location --output ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} $HORIZON_UPSTREAM_URL
MD5_SUM=$(md5sum ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} | cut -d" " -f1)
if [ $MD5_SUM != $HORIZON_MD5_SUM ] ; then
exit 1;
fi
tar xvvf ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL} --directory ${PKG_BUILD_DIR} --strip-components 1
rm ${PKG_BUILD_DIR}/${HORIZON_TAR_BALL}
# FILES
mkdir -p ${PKG_BUILD_DIR}/files
cp ${PKG_EXTRA_FILES_DIR}/guni_config.py ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-assets-compress ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-clearsessions ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon.init ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon.logrotate ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/horizon-patching-restart ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/openstack-dashboard-httpd-2.4.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/openstack-dashboard-httpd-logging.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/python-django-horizon-logrotate.conf ${PKG_BUILD_DIR}/files/
cp ${PKG_EXTRA_FILES_DIR}/python-django-horizon-systemd.conf ${PKG_BUILD_DIR}/files/