Omaha #3339 - created a method to build non-EDEX and non-CAVE RPMs contributed by Work Assignments.
Former-commit-id:98a310f4a7
[formerly98a310f4a7
[formerly e0bb64fc5112a15d9d991eb8f39de42b541f4e54]] Former-commit-id:6a197f845d
Former-commit-id:0fdfc0fd4a
This commit is contained in:
parent
9a1bc8c521
commit
d1898937e0
2 changed files with 65 additions and 3 deletions
44
rpms/build/x86_64/WA_rpm_build.sh
Normal file
44
rpms/build/x86_64/WA_rpm_build.sh
Normal file
|
@ -0,0 +1,44 @@
|
|||
function WA_rpm_build()
|
||||
{
|
||||
echo "Scanning the Baseline for WA-Contributed RPMs ..."
|
||||
|
||||
files=(${WORKSPACE}/rpms-*)
|
||||
if [ ! -d "${files[0]}" ]; then
|
||||
echo "No WA-Contributed RPMs were found!"
|
||||
return
|
||||
fi
|
||||
|
||||
wa_contrib_count=`ls -1d ${WORKSPACE}/rpms-* | wc -l`
|
||||
|
||||
echo "Found ${wa_contrib_count} WA-Contributed RPMs."
|
||||
for rpm_contribution in `ls -1d ${WORKSPACE}/rpms-*`; do
|
||||
echo "Processing WA-Contributed RPMs ... ${rpm_contribution}"
|
||||
|
||||
_build_dir="${rpm_contribution}/build"
|
||||
_lookup_script="${_build_dir}/lookupWA_RPM.sh"
|
||||
_contribution_txt="${_build_dir}/wa-rpms.txt"
|
||||
|
||||
source "${_lookup_script}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: unable to access the expected WA lookup script - ${_lookup_script}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${_contribution_txt}" ]; then
|
||||
echo "ERROR: unable to access the expected contribution text - ${_contribution_txt}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for contribution in `cat ${_contribution_txt}`; do
|
||||
lookupWA_RPM "${contribution}" "${rpm_contribution}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: '${contribution}' is not a recognized AWIPS II RPM."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRPMExec "${RPM_SPECIFICATION}"
|
||||
done
|
||||
|
||||
return 0
|
||||
done
|
||||
}
|
|
@ -10,6 +10,16 @@ function buildRPM()
|
|||
exit 1
|
||||
fi
|
||||
|
||||
buildRPMExec "${RPM_SPECIFICATION}"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function buildRPMExec()
|
||||
{
|
||||
# Arguments:
|
||||
# 1) specs file location
|
||||
|
||||
/usr/bin/rpmbuild -ba \
|
||||
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
||||
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
||||
|
@ -22,13 +32,11 @@ function buildRPM()
|
|||
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
|
||||
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
|
||||
--buildroot ${AWIPSII_BUILD_ROOT} \
|
||||
${RPM_SPECIFICATION}/component.spec
|
||||
${1}/component.spec
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Failed to build RPM ${1}."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
# This script will build all of the 64-bit rpms.
|
||||
|
@ -78,6 +86,11 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
source ${dir}/WA_rpm_build.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "WARNING: Unable to find the WA-RPM Build Contributions."
|
||||
fi
|
||||
|
||||
export LIGHTNING=true
|
||||
# Determine if the optional '-nobinlightning' argument has been specified.
|
||||
if [ "${2}" = "-nobinlightning" ]; then
|
||||
|
@ -99,6 +112,11 @@ if [ "${1}" = "-buildRPM" -a -n "${2}" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-WA" ]; then
|
||||
WA_rpm_build
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-64bit" ]; then
|
||||
buildCAVE
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue