awips2/rpms/awips2.core/Installer.java/build.sh
Bryan Kowal 203d886739 Issue #2047 - initial commit of Java 1.7; rpm build can build both Java 6 and Java 7
- Amend: update 32-bit rpm build script

Change-Id: I23fae3f39e7fedb00b46fffb3aa1540dd87ed6b6

Former-commit-id: b68957a08d64f697b373bb017e28ee5fa186ed82
2013-05-31 11:47:09 -05:00

43 lines
1.1 KiB
Bash

# verify that the workspace, rpm top directory, and build root are available in the environment
if [ -z ${WORKSPACE} ]; then
echo "Error: the location of the baseline workspace must be specified using the WORKSPACE environment variable."
exit 1
fi
if [ -z ${AWIPSII_TOP_DIR} ]; then
echo "Error: the location of the rpm top directory must be specified using the AWIPSII_TOP_DIR environment variable."
exit 1
fi
if [ -z ${AWIPSII_BUILD_ROOT} ]; then
echo "Error: the location of the AWIPS II build root must be specified using the AWIPSII_BUILD_ROOT environment variable."
exit 1
fi
function buildRPM()
{
SPECS=${1}
/usr/bin/rpmbuild -ba \
--define "_topdir ${AWIPSII_TOP_DIR}" \
--define "_build_root ${AWIPSII_BUILD_ROOT}" \
--define "_baseline_workspace ${WORKSPACE}" \
--buildroot ${AWIPSII_BUILD_ROOT} \
${SPECS}
if [ $? -ne 0 ]; then
return 1
fi
}
# build java 1.6
SPECS=1.6/component.spec
buildRPM ${SPECS}
if [ $? -ne 0 ]; then
exit 1
fi
# build java 1.7
SPECS=1.7/component.spec
buildRPM ${SPECS}
if [ $? -ne 0 ]; then
exit 1
fi