Omaha #3339 - created a method to build non-EDEX and non-CAVE RPMs contributed by Work Assignments.
Former-commit-id:ee4b7c4ee8
[formerly58a2ae8bc8
] [formerly98a310f4a7
] [formerlyee4b7c4ee8
[formerly58a2ae8bc8
] [formerly98a310f4a7
] [formerly6a197f845d
[formerly98a310f4a7
[formerly e0bb64fc5112a15d9d991eb8f39de42b541f4e54]]]] Former-commit-id:6a197f845d
Former-commit-id:b2d4debdce
[formerlyac1b94c63f
] [formerly ed8425afeb482fb12b827adf7402a0eda661e5fb [formerly0fdfc0fd4a
]] Former-commit-id: d14384ae75f25093f489626ca51658c2d08fe2cc [formerlyd1898937e0
] Former-commit-id:ec5f9c6623
This commit is contained in:
parent
175c675ac9
commit
7a007960cf
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
buildRPMExec "${RPM_SPECIFICATION}"
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildRPMExec()
|
||||||
|
{
|
||||||
|
# Arguments:
|
||||||
|
# 1) specs file location
|
||||||
|
|
||||||
/usr/bin/rpmbuild -ba \
|
/usr/bin/rpmbuild -ba \
|
||||||
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
||||||
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
||||||
|
@ -22,13 +32,11 @@ function buildRPM()
|
||||||
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
|
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
|
||||||
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
|
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
|
||||||
--buildroot ${AWIPSII_BUILD_ROOT} \
|
--buildroot ${AWIPSII_BUILD_ROOT} \
|
||||||
${RPM_SPECIFICATION}/component.spec
|
${1}/component.spec
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to build RPM ${1}."
|
echo "ERROR: Failed to build RPM ${1}."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This script will build all of the 64-bit rpms.
|
# This script will build all of the 64-bit rpms.
|
||||||
|
@ -78,6 +86,11 @@ if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
export LIGHTNING=true
|
||||||
# Determine if the optional '-nobinlightning' argument has been specified.
|
# Determine if the optional '-nobinlightning' argument has been specified.
|
||||||
if [ "${2}" = "-nobinlightning" ]; then
|
if [ "${2}" = "-nobinlightning" ]; then
|
||||||
|
@ -99,6 +112,11 @@ if [ "${1}" = "-buildRPM" -a -n "${2}" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${1}" = "-WA" ]; then
|
||||||
|
WA_rpm_build
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${1}" = "-64bit" ]; then
|
if [ "${1}" = "-64bit" ]; then
|
||||||
buildCAVE
|
buildCAVE
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue