Files
rme-jenkins/jenkins_builder.sh
T
torstenandCopilot 7f98750611 Update jenkins_builder.sh to DEB terminology for Ubuntu 26.04
- Changed comments from RPM to DEB terminology
- Updated build directory from rpmbuild/ to debbuild/
- Removed .rpmmacros configuration (not needed for DEB)
- Changed script call to make_rpm_ubuntu26.py
- Updated output messages

Part of Qt5/C++11 to Qt6/C++23 migration project.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 10:11:44 +02:00

43 lines
2.0 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Build an LTS DEB package for one project flavor (ahtc / guez).
# Driven by rpmbuild/make_rpm_ubuntu26.py — see also jenkins/Jenkinsfile.
#
# Required environment (set by the Jenkinsfile or `docker run -e ...`):
# PROJECT LTS flavor: qatar | ahtc | guez (cmake -D_pname)
# OS_VERSION Ubuntu base version, e.g. 26.04
# LTS_VERSION Major.minor LTS version, e.g. 1.0
# GUEZ_MODE ON | OFF — cmake -DGUEZ_MODE
# WORKSPACE Jenkins workspace path (set automatically by Jenkins)
# PROJECT_BASE_DIR Path used by make_rpm_ubuntu26.py as the source tree (basename must be 'legatus')
# BUILD_VERSION Spec suffix selector for make_rpm_ubuntu26.py (lts${BUILD_VERSION}.spec)
# BUILD_NUMBER Jenkins build number (used as @RELEASE@ in the spec)
# BUILD_TAG Jenkins build tag (used as @JENKINS_BUILD_TAG@ in the spec)
#
set -eo pipefail
: "${PROJECT:?PROJECT must be set}"
: "${OS_VERSION:?OS_VERSION must be set}"
: "${LTS_VERSION:?LTS_VERSION must be set}"
: "${GUEZ_MODE:?GUEZ_MODE must be set}"
: "${WORKSPACE:?WORKSPACE must be set}"
: "${PROJECT_BASE_DIR:?PROJECT_BASE_DIR must be set}"
echo "Building LTS ${LTS_VERSION}-${BUILD_NUMBER:-?} DEB package for project '${PROJECT}' (OS ${OS_VERSION})."
echo "Spec selector : lts${BUILD_VERSION:-}.spec"
echo "PROJECT_BASE_DIR=${PROJECT_BASE_DIR}"
mkdir -p /shd/CTC/TOOLS/debbuild/{BUILD,BUILDROOT,DEBS,SOURCES,SPECS}
# Output is isolated per OS version so parallel OS builds of the same project
cd "${WORKSPACE}/rpmbuild"
python make_rpm_ubuntu26.py -c LTS \
--project_name "${PROJECT}" \
--version "${LTS_VERSION}" \
--output_dir "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/" \
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DBUILD_SV=ON -DBUILD_WS=ON -DBUILD_AAR=ON -DBUILD_HLA=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/pgsql/"
echo "DEB packages produced for '${PROJECT}' (OS ${OS_VERSION}):"
ls -lhR "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/"