#!/usr/bin/env bash
set -e
export SRC_DIR=${TOPDIR}
export RES_DIR=${TOPDIR}/results
export PACKAGE_NAME=barco-edu-proxy
export NPM_CONFIG_REGISTRY=https://bin.barco.com:443/artifactory/api/npm/npm-virtual
export NPM_CONFIG__AUTH=$(curl -s -X GET -u${NPM_USER_USR}:${NPM_USER_PSW} https://bin.barco.com/artifactory/api/npm/auth | grep _auth | cut -d = -f 2 | cut -d ' ' -f 2)
export NPM_CONFIG_ALWAYS_AUTH=true
export PACKAGES_TO_INSTALL="barco-nrc barco-edu-proxy python3-cffi-backend"
export SYSTEM_NAME=nrc
export ISO_DIR=${RES_DIR}/iso
export BLACKLISTED_PACKAGES=""
export LIST_OF_VARS_TO_REPLACE='${BLACKLISTED_PACKAGES},${LOCAL_CD},${CD_VERSION},${PACKAGES_TO_INSTALL},${SYSTEM_NAME},${BASEOS_DISTRO_REPO},${DEBIAN_DISTRO}'
export PROCESS_FILES="debian/changelog Makefile"
export ISO_CFG=${SYSTEM_NAME,,}-${BASEOS_DISTRO_REPO}
export MAKEFILE_LOCATION=Makefile
export ELECTRON_MIRROR=https://$TF_VAR_ARTIFACTORY_USR:$TF_VAR_ARTIFACTORY_PSW@bin.barco.com/artifactory/www-cache/edu-electron/
export VAR_LIST="BARCO_PACKAGING ELECTRON_MIRROR TMPFS_DIR PACKAGE_VERSION DISTRIBUTION IMAGE_VERSION NPM_CONFIG_REGISTRY NPM_CONFIG__AUTH NPM_CONFIG_ALWAYS_AUTH MAKEFILE_LOCATION TF_VAR_ARTIFACTORY_APIKEY"
export DO_APT_UPGRADE=TRUE
export MB_MXTRY=500
export MB_SLEEP=30
export PACKAGING_SWITCHES="-g --use-pdebuild-internal"
export SKIP_BUILD_DEPS=TRUE
