Issue #2422 - fix 14.2.1 RHEL6 build
Former-commit-id:87087a5ea4
[formerly 19b9b3e4f5e3bc3d78c25afe4507c3e9c11eacb6] Former-commit-id:61527c0b80
This commit is contained in:
parent
bb5acf7c11
commit
efd377f12f
5 changed files with 41 additions and 66 deletions
|
@ -25,17 +25,19 @@ fi
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# 1) the workspace
|
# 1) the workspace
|
||||||
# 2) the uframe-eclipse
|
# 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
|
# ensure that there are at least three arguments
|
||||||
if [ $# -ne 3 ]; then
|
if [ $# -ne 4 ]; then
|
||||||
echo "Usage: $0 WORKSPACE UFRAME_ECLIPSE BUILD_ROOT"
|
echo "Usage: $0 WORKSPACE UFRAME_ECLIPSE WORKSPACE_LOC BUILD_ROOT"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
WORKSPACE=${1}
|
WORKSPACE=${1}
|
||||||
UFRAME_ECLIPSE=${2}
|
UFRAME_ECLIPSE=${2}
|
||||||
BUILD_ROOT=${3}
|
BUILD_ROOT=${3}
|
||||||
|
DESTINATION_ROOT=${4}
|
||||||
|
|
||||||
# ensure that the workspace directory exists
|
# ensure that the workspace directory exists
|
||||||
if [ ! -d ${WORKSPACE} ]; then
|
if [ ! -d ${WORKSPACE} ]; then
|
||||||
|
@ -117,82 +119,73 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
# create the notification sub-directories
|
# create the notification sub-directories
|
||||||
mkdir ${BUILD_ROOT}/awips2/notification/bin
|
mkdir ${DESTINATION_ROOT}/awips2/notification/bin
|
||||||
if [ $? -ne 0 ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
mkdir ${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
|
mkdir ${DESTINATION_ROOT}/awips2/notification/${FOSS_LIB_DIR}
|
||||||
if [ $? -ne 0 ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
mkdir ${BUILD_ROOT}/awips2/notification/src
|
mkdir ${DESTINATION_ROOT}/awips2/notification/src
|
||||||
if [ $? -ne 0 ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
mkdir ${BUILD_ROOT}/awips2/notification/include
|
mkdir ${DESTINATION_ROOT}/awips2/notification/include
|
||||||
if [ $? -ne 0 ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# libedex_com.so -> notification/lib
|
# libedex_com.so -> notification/lib
|
||||||
if [ -f "${BUILD_ROOT}/workspace_/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" ]; then
|
if [ -f "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" ]; then
|
||||||
cp -v "${BUILD_ROOT}/workspace_/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
|
cp -v "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
|
||||||
${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
|
${DESTINATION_ROOT}/awips2/notification/${FOSS_LIB_DIR}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy libedex_com.so to its destination."
|
echo "ERROR: Failed to copy libedex_com.so to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cp -v "${WORKSPACE}/edex_com/${BUILD_CONFIGURATION}/libedex_com.so" \
|
echo "ERROR: Unable to locate the built: libedex_com.so."
|
||||||
${BUILD_ROOT}/awips2/notification/${FOSS_LIB_DIR}
|
exit 1
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "ERROR: Failed to copy libedex_com.so to its destination."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
# edex_com src -> notification/src
|
# edex_com src -> notification/src
|
||||||
cp -vf ${BUILD_ROOT}/workspace_/edex_com/src/*.cpp \
|
cp -vf ${BUILD_ROOT}/workspace_/edex_com/src/*.cpp \
|
||||||
${BUILD_ROOT}/awips2/notification/src
|
${DESTINATION_ROOT}/awips2/notification/src
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy the edex_com src to its destination."
|
echo "ERROR: Failed to copy the edex_com src to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# edex_com headers -> notification/include
|
# 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
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy the edex_com header to its destination."
|
echo "ERROR: Failed to copy the edex_com header to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# edex_notify -> notification/bin
|
# edex_notify -> notification/bin
|
||||||
if [ -f "${BUILD_ROOT}/workspace_/edex_notify/${BUILD_CONFIGURATION}/edex_notify" ]; then
|
if [ -f "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" ]; then
|
||||||
cp -vf "${BUILD_ROOT}/workspace_/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
|
cp -vf "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
|
||||||
${BUILD_ROOT}/awips2/notification/bin
|
${DESTINATION_ROOT}/awips2/notification/bin
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy edex_notify to its destination."
|
echo "ERROR: Failed to copy edex_notify to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cp -vf "${WORKSPACE}/edex_notify/${BUILD_CONFIGURATION}/edex_notify" \
|
echo "ERROR: Unable to locate the built: edex_notify."
|
||||||
${BUILD_ROOT}/awips2/notification/bin
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "ERROR: Failed to copy edex_notify to its destination."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
# edex_notify src -> notification/src
|
# edex_notify src -> notification/src
|
||||||
cp -vf ${BUILD_ROOT}/workspace_/edex_notify/src/*.c \
|
cp -vf ${BUILD_ROOT}/workspace_/edex_notify/src/*.c \
|
||||||
${BUILD_ROOT}/awips2/notification/src
|
${DESTINATION_ROOT}/awips2/notification/src
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy the edex_notify src to its destination."
|
echo "ERROR: Failed to copy the edex_notify src to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# org.apache.thrift lib -> notification/lib
|
# org.apache.thrift lib -> notification/lib
|
||||||
cp -vPf ${BUILD_ROOT}/workspace_/org.apache.thrift/${FOSS_LIB_DIR}/* \
|
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
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to copy the org.apache.thrift lib to its destination."
|
echo "ERROR: Failed to copy the org.apache.thrift lib to its destination."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
%define _component_name awips2-notification
|
%define _component_name awips2-notification
|
||||||
%define _component_project_dir awips2.core/Installer.notification
|
%define _component_project_dir awips2.core/Installer.notification
|
||||||
%define _component_default_prefix /awips2/notification
|
%define _component_default_prefix /awips2/notification
|
||||||
|
%define _cdt_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
%define _build_arch %(uname -i)
|
%define _build_arch %(uname -i)
|
||||||
%if %_build_arch == "x86_64"
|
%if %_build_arch == "x86_64"
|
||||||
%define _lib_dir lib64
|
%define _lib_dir lib64
|
||||||
|
@ -49,6 +50,12 @@ if [ -d ${RPM_BUILD_ROOT} ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ -d %{_cdt_build_loc} ]; then
|
||||||
|
rm -rf %{_cdt_build_loc}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
@ -87,15 +94,15 @@ if [ $? -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_NATIVE="%{_baseline_workspace}/build.native"
|
BUILD_NATIVE="%{_baseline_workspace}/build.native"
|
||||||
|
mkdir -p %{_cdt_build_loc}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
pushd . > /dev/null 2>&1
|
pushd . > /dev/null 2>&1
|
||||||
cd ${BUILD_NATIVE}
|
cd ${BUILD_NATIVE}
|
||||||
/bin/bash build-notification.sh %{_baseline_workspace} \
|
/bin/bash build-notification.sh %{_baseline_workspace} \
|
||||||
%{_uframe_eclipse} ${RPM_BUILD_ROOT}
|
%{_uframe_eclipse} %{_cdt_build_loc} ${RPM_BUILD_ROOT}
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
rm -rf ${RPM_BUILD_ROOT}/workspace_
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -107,22 +114,12 @@ cp %{_baseline_workspace}/${PROFILE_D_DIR}/* ${RPM_BUILD_ROOT}/etc/profile.d
|
||||||
copyLegal "awips2/notification"
|
copyLegal "awips2/notification"
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
if [ "${1}" = "2" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ "${1}" = "2" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ "${1}" = "1" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
rm -rf %{_cdt_build_loc}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(644,awips,fxalpha,755)
|
%defattr(644,awips,fxalpha,755)
|
||||||
|
|
|
@ -8,5 +8,5 @@ org.apache.commons.lang/commons-lang-2.3.jar
|
||||||
org.apache.commons.collections/commons-collections-3.2.jar
|
org.apache.commons.collections/commons-collections-3.2.jar
|
||||||
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
|
org.codehaus.jackson/jackson-core-asl-1.7.3.jar
|
||||||
org.codehaus.jackson/jackson-mapper-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
|
org.apache.commons.cxf/geronimo-servlet_2.5_spec-1.1.2.jar
|
||||||
|
|
|
@ -124,8 +124,8 @@ if [ "${1}" = "-64bit" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${1}" = "-rh6" ]; then
|
if [ "${1}" = "-rh6" ]; then
|
||||||
buildRPM "awips2-notification"
|
|
||||||
buildRPM "awips2-common-base"
|
buildRPM "awips2-common-base"
|
||||||
|
buildRPM "awips2-notification"
|
||||||
buildEDEX
|
buildEDEX
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -98,21 +98,6 @@ fi
|
||||||
# Copy the monitoring script to bin
|
# Copy the monitoring script to bin
|
||||||
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
|
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
|
||||||
%{_build_root}/awips2/python/bin
|
%{_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
|
%preun
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue