Issue #2422 - fix 14.2.1 RHEL6 build

Former-commit-id: 87087a5ea4 [formerly 19b9b3e4f5e3bc3d78c25afe4507c3e9c11eacb6]
Former-commit-id: 61527c0b80
This commit is contained in:
Bryan Kowal 2013-10-02 18:41:11 -05:00
parent bb5acf7c11
commit efd377f12f
5 changed files with 41 additions and 66 deletions

View file

@ -25,17 +25,19 @@ fi
# Arguments:
# 1) the workspace
# 2) the uframe-eclipse
# 3) the build root (will become the location of the temporary workspace)
# 3) the location of the temporary workspace
# 4) the build root
# ensure that there are at least three arguments
if [ $# -ne 3 ]; then
echo "Usage: $0 WORKSPACE UFRAME_ECLIPSE BUILD_ROOT"
if [ $# -ne 4 ]; then
echo "Usage: $0 WORKSPACE UFRAME_ECLIPSE WORKSPACE_LOC BUILD_ROOT"
exit 0
fi
WORKSPACE=${1}
UFRAME_ECLIPSE=${2}
BUILD_ROOT=${3}
DESTINATION_ROOT=${4}
# ensure that the workspace directory exists
if [ ! -d ${WORKSPACE} ]; then
@ -117,82 +119,73 @@ do
done
# create the notification sub-directories
mkdir ${BUILD_ROOT}/awips2/notification/bin
mkdir ${DESTINATION_ROOT}/awips2/notification/bin
if [ $? -ne 0 ]; then
echo "ERROR: Unable to create directory - ${BUILD_ROOT}/workspace_/notification/bin."
echo "ERROR: Unable to create directory - ${DESTINATION_ROOT}/workspace_/notification/bin."
exit 1
fi
mkdir ${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
mkdir ${DESTINATION_ROOT}/awips2/notification/${FOSS_LIB_DIR}
if [ $? -ne 0 ]; then
echo "ERROR: Unable to create directory - ${BUILD_ROOT}/workspace_/notification/lib."
echo "ERROR: Unable to create directory - ${DESTINATION_ROOT}/workspace_/notification/lib."
exit 1
fi
mkdir ${BUILD_ROOT}/awips2/notification/src
mkdir ${DESTINATION_ROOT}/awips2/notification/src
if [ $? -ne 0 ]; then
echo "ERROR: Unable to create directory - ${BUILD_ROOT}/workspace_/notification/src."
echo "ERROR: Unable to create directory - ${DESTINATION_ROOT}/workspace_/notification/src."
exit 1
fi
mkdir ${BUILD_ROOT}/awips2/notification/include
mkdir ${DESTINATION_ROOT}/awips2/notification/include
if [ $? -ne 0 ]; then
echo "ERROR: Unable to create directory - ${BUILD_ROOT}/workspace_/notification/include."
echo "ERROR: Unable to create directory - ${DESTINATION_ROOT}/workspace_/notification/include."
exit 1
fi
# libedex_com.so -> notification/lib
if [ -f "${BUILD_ROOT}/workspace_/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" ]; then
cp -v "${BUILD_ROOT}/workspace_/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
if [ -f "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" ]; then
cp -v "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
${DESTINATION_ROOT}/awips2/notification/${FOSS_LIB_DIR}
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy libedex_com.so to its destination."
exit 1
fi
else
cp -v "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy libedex_com.so to its destination."
exit 1
fi
echo "ERROR: Unable to locate the built: libedex_com.so."
exit 1
fi
# edex_com src -> notification/src
cp -vf ${BUILD_ROOT}/workspace_/edex_com/src/*.cpp \
${BUILD_ROOT}/awips2/notification/src
${DESTINATION_ROOT}/awips2/notification/src
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy the edex_com src to its destination."
exit 1
fi
# edex_com headers -> notification/include
cp -vf ${BUILD_ROOT}/workspace_/edex_com/src/*.h ${BUILD_ROOT}/awips2/notification/include
cp -vf ${BUILD_ROOT}/workspace_/edex_com/src/*.h ${DESTINATION_ROOT}/awips2/notification/include
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy the edex_com header to its destination."
exit 1
fi
# edex_notify -> notification/bin
if [ -f "${BUILD_ROOT}/workspace_/edex_notify/${BUILD_CONFIGURATION}/edex_notify" ]; then
cp -vf "${BUILD_ROOT}/workspace_/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
${BUILD_ROOT}/awips2/notification/bin
if [ -f "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" ]; then
cp -vf "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
${DESTINATION_ROOT}/awips2/notification/bin
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy edex_notify to its destination."
exit 1
fi
else
cp -vf "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
${BUILD_ROOT}/awips2/notification/bin
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy edex_notify to its destination."
exit 1
fi
echo "ERROR: Unable to locate the built: edex_notify."
fi
# edex_notify src -> notification/src
cp -vf ${BUILD_ROOT}/workspace_/edex_notify/src/*.c \
${BUILD_ROOT}/awips2/notification/src
${DESTINATION_ROOT}/awips2/notification/src
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy the edex_notify src to its destination."
exit 1
fi
# org.apache.thrift lib -> notification/lib
cp -vPf ${BUILD_ROOT}/workspace_/org.apache.thrift/${FOSS_LIB_DIR}/* \
${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
${DESTINATION_ROOT}/awips2/notification/${FOSS_LIB_DIR}
if [ $? -ne 0 ]; then
echo "ERROR: Failed to copy the org.apache.thrift lib to its destination."
exit 1

View file

@ -1,6 +1,7 @@
%define _component_name awips2-notification
%define _component_project_dir awips2.core/Installer.notification
%define _component_default_prefix /awips2/notification
%define _cdt_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define _build_arch %(uname -i)
%if %_build_arch == "x86_64"
%define _lib_dir lib64
@ -49,6 +50,12 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
exit 1
fi
fi
if [ -d %{_cdt_build_loc} ]; then
rm -rf %{_cdt_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
fi
%build
@ -87,15 +94,15 @@ if [ $? -ne 0 ]; then
fi
BUILD_NATIVE="%{_baseline_workspace}/build.native"
mkdir -p %{_cdt_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null 2>&1
cd ${BUILD_NATIVE}
/bin/bash build-notification.sh %{_baseline_workspace} \
%{_uframe_eclipse} ${RPM_BUILD_ROOT}
if [ $? -ne 0 ]; then
exit 1
fi
rm -rf ${RPM_BUILD_ROOT}/workspace_
%{_uframe_eclipse} %{_cdt_build_loc} ${RPM_BUILD_ROOT}
if [ $? -ne 0 ]; then
exit 1
fi
@ -107,22 +114,12 @@ cp %{_baseline_workspace}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
copyLegal "awips2/notification"
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
%post
if [ "${1}" = "2" ]; then
exit 0
fi
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
rm -rf %{_cdt_build_loc}
%files
%defattr(644,awips,fxalpha,755)

View file

@ -8,5 +8,5 @@ org.apache.commons.lang/commons-lang-2.3.jar
org.apache.commons.collections/commons-collections-3.2.jar
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
org.codehaus.jackson/jackson-mapper-asl-1.7.3.jar
org.junit/mockito-all-1.9.0.jar
org.mockito/mockito-all-1.9.0.jar
org.apache.commons.cxf/geronimo-servlet_2.5_spec-1.1.2.jar

View file

@ -124,8 +124,8 @@ if [ "${1}" = "-64bit" ]; then
fi
if [ "${1}" = "-rh6" ]; then
buildRPM "awips2-notification"
buildRPM "awips2-common-base"
buildRPM "awips2-notification"
buildEDEX
if [ $? -ne 0 ]; then
exit 1

View file

@ -98,21 +98,6 @@ fi
# Copy the monitoring script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
%{_build_root}/awips2/python/bin
cp -prv %{_python_build_loc}/${QPID_SPECS}/* \
%{_build_root}/awips2/python/share/amqp
# get the path to the awips2-python that is installed
PYDIR="/awips2/python"
# get the python version so we can fix the amqp xml/dtd
PYTHON_VERSION=$( LD_LIBRARY_PATH=${PYDIR}/lib ${PYDIR}/bin/python -c "from distutils.sysconfig import get_python_version; print get_python_version()" )
if [ $? -ne 0 ]; then
exit 1
fi
# the file /awips2/python/lib/python$PYTHON_VERSION/site-packages/qpid_config.py is wrong
# this substitution will put the correct path in the file qpid_config.py
# otherwise it will generate AMQP errors when run, it won't find the directory
%preun