diff --git a/nativeLib/build.native/build-notification.sh b/nativeLib/build.native/build-notification.sh index 4906b84f73..6aa118e512 100644 --- a/nativeLib/build.native/build-notification.sh +++ b/nativeLib/build.native/build-notification.sh @@ -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 diff --git a/rpms/awips2.core/Installer.notification/component.spec b/rpms/awips2.core/Installer.notification/component.spec index a58d35f4cc..e18ab79144 100644 --- a/rpms/awips2.core/Installer.notification/component.spec +++ b/rpms/awips2.core/Installer.notification/component.spec @@ -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) diff --git a/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt b/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt index 9d4e05c4d7..cf269bcc3a 100644 --- a/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt +++ b/rpms/awips2.qpid/0.18/SOURCES/awips2/dependencies.txt @@ -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 diff --git a/rpms/build/x86_64/build.sh b/rpms/build/x86_64/build.sh index e4574e7903..1874daa1ae 100644 --- a/rpms/build/x86_64/build.sh +++ b/rpms/build/x86_64/build.sh @@ -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 diff --git a/rpms/python.site-packages/Installer.qpid/component.spec b/rpms/python.site-packages/Installer.qpid/component.spec index 762a1ee271..44e489223d 100644 --- a/rpms/python.site-packages/Installer.qpid/component.spec +++ b/rpms/python.site-packages/Installer.qpid/component.spec @@ -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