- updated edexBridge to use the QPID 0.18 API - awips2-ldm is now ready for RHEL 6 - the QPID 0.18 rpms now build for RHEL 6 - disabled the build of QPID 0.7 - awips2-qpid-lib (new to RHEL 6) is now ready Former-commit-id:6e76fc6624
[formerly5feab7c0be
] [formerlybbca63a8b8
] [formerly6e76fc6624
[formerly5feab7c0be
] [formerlybbca63a8b8
] [formerly36eca9bbfb
[formerlybbca63a8b8
[formerly d0f73c3852e45ec7b2363b46c77a94d7b3a47143]]]] Former-commit-id:36eca9bbfb
Former-commit-id:45ab6afc31
[formerly9b62e39fff
] [formerly be9ce96e1e14d369e98c21317e7f54a4d7d48430 [formerly1f5e92aac9
]] Former-commit-id: 371f2a79d88405004e831cbc983ff10de8c7cfeb [formerly858a41c50d
] Former-commit-id:b32933f72a
185 lines
4.6 KiB
Bash
185 lines
4.6 KiB
Bash
#!/bin/bash
|
|
|
|
function buildJava()
|
|
{
|
|
pushd . > /dev/null 2>&1
|
|
|
|
cd ${WORKSPACE}/rpms/awips2.core/Installer.java
|
|
/bin/bash build.sh
|
|
if [ $? -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
popd > /dev/null 2>&1
|
|
}
|
|
|
|
function buildQPID()
|
|
{
|
|
# Arguments:
|
|
# ${1} == optionally -ade
|
|
|
|
pushd . > /dev/null 2>&1
|
|
|
|
cd ${WORKSPACE}/rpms/awips2.qpid
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the qpid rpms."
|
|
return 1
|
|
fi
|
|
|
|
/bin/bash build.sh 0.18
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the qpid rpms."
|
|
return 1
|
|
fi
|
|
|
|
# ensure that the destination rpm directories exist
|
|
if [ ! -d ${AWIPSII_TOP_DIR}/RPMS/noarch ]; then
|
|
mkdir -p ${AWIPSII_TOP_DIR}/RPMS/noarch
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Copy the 0.18 qpid rpms
|
|
cd ${WORKSPACE}/rpms/awips2.qpid/0.18/RPMS/noarch
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build Qpid v0.18."
|
|
return 1
|
|
fi
|
|
/bin/cp -v *.rpm ${AWIPSII_TOP_DIR}/RPMS/noarch
|
|
if [ $? -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
cd ${WORKSPACE}/rpms/awips2.qpid/0.18/RPMS/x86_64
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build Qpid v0.18."
|
|
return 1
|
|
fi
|
|
/bin/cp -v *.rpm ${AWIPSII_TOP_DIR}/RPMS/x86_64
|
|
if [ $? -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
popd > /dev/null 2>&1
|
|
|
|
return 0
|
|
}
|
|
|
|
function buildEDEX()
|
|
{
|
|
cd ${WORKSPACE}/rpms/awips2.edex/deploy.builder
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the edex rpms."
|
|
return 1
|
|
fi
|
|
|
|
# Determine the build architecture.
|
|
export EDEX_BUILD_ARCH=`uname -i`
|
|
if [ "${EDEX_BUILD_ARCH}" = "i386" ]; then
|
|
export EDEX_BUILD_ARCH="x86"
|
|
fi
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to determine the architecture."
|
|
return 1
|
|
fi
|
|
/bin/bash build.sh
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the edex rpms."
|
|
return 1
|
|
fi
|
|
|
|
return 0
|
|
}
|
|
|
|
function buildCAVE()
|
|
{
|
|
cd ${WORKSPACE}/rpms/awips2.cave/deploy.builder
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the cave rpms."
|
|
return 1
|
|
fi
|
|
|
|
# Determine the build architecture.
|
|
export CAVE_BUILD_ARCH=`uname -i`
|
|
if [ "${CAVE_BUILD_ARCH}" = "i386" ]; then
|
|
export CAVE_BUILD_ARCH="x86"
|
|
fi
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to determine the architecture."
|
|
return 1
|
|
fi
|
|
/bin/bash build.sh
|
|
if [ $? -ne 0 ]; then
|
|
echo "ERROR: Failed to build the cave rpms."
|
|
return 1
|
|
fi
|
|
|
|
return 0
|
|
}
|
|
|
|
function buildLocalizationRPMs()
|
|
{
|
|
awips2_core_directory=${WORKSPACE}/rpms/awips2.core
|
|
extract_site_pl="${awips2_core_directory}/deploy.builder/extractSite.pl"
|
|
installer_localization_directory="${awips2_core_directory}/Installer.localization"
|
|
localization_SPECIFICATION="${installer_localization_directory}/component.spec"
|
|
|
|
# Find all of the localization.${site} directories, if there are any.
|
|
ls ${WORKSPACE}/localization.* > /dev/null 2>&1
|
|
RC=$?
|
|
if [ ${RC} -ne 0 ]; then
|
|
# There are not any localization projects.
|
|
echo "INFO: There are not any localization projects."
|
|
return 0
|
|
fi
|
|
|
|
for localization in `cd ${WORKSPACE}; ls -1d localization.*;`; do
|
|
site=`/usr/bin/perl ${extract_site_pl} ${localization}`
|
|
if [ $? -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
export LOCALIZATION_DIRECTORY="${localization}"
|
|
export COMPONENT_NAME="awips2-localization-${site}"
|
|
export site=${site}
|
|
|
|
echo "Building localization rpm for site: ${site}."
|
|
|
|
rpmbuild -ba \
|
|
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
|
|
--define '_component_version %(echo ${AWIPSII_VERSION})' \
|
|
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
|
|
--define '_component_name %(echo ${COMPONENT_NAME})' \
|
|
--define '_baseline_workspace %(echo ${WORKSPACE})' \
|
|
--define '_localization_directory %(echo ${LOCALIZATION_DIRECTORY})' \
|
|
--define '_localization_site %(echo ${site})' \
|
|
--buildroot ${AWIPSII_BUILD_ROOT} \
|
|
${localization_SPECIFICATION}
|
|
RC=$?
|
|
unset LOCALIZATION_DIRECTORY
|
|
unset COMPONENT_NAME
|
|
if [ ${RC} -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
done
|
|
|
|
return 0
|
|
}
|
|
|
|
function unpackHttpdPypies()
|
|
{
|
|
# This function will unpack the httpd-pypies SOURCES
|
|
# into the: ${AWIPSII_TOP_DIR}/SOURCES directory.
|
|
awips2_core_directory=${WORKSPACE}/rpms/awips2.core
|
|
httpd_pypies_directory=${awips2_core_directory}/Installer.httpd-pypies
|
|
httpd_SOURCES=${httpd_pypies_directory}/src/httpd-2.2.15-SOURCES.tar
|
|
|
|
/bin/tar -xvf ${httpd_SOURCES} -C ${AWIPSII_TOP_DIR}/SOURCES
|
|
if [ $? -ne 0 ]; then
|
|
return 1
|
|
fi
|
|
|
|
return 0
|
|
}
|