Issue #1957 - the build is now compatible with the expanded native tar file.

Former-commit-id: 9ab0fe2d49 [formerly 71da9825f9] [formerly 91174d197d] [formerly 9ab0fe2d49 [formerly 71da9825f9] [formerly 91174d197d] [formerly bb4785d16a [formerly 91174d197d [formerly d30ec5494a2fd748d25dbec55e5a4b918e204682]]]]
Former-commit-id: bb4785d16a
Former-commit-id: 430ed07af8 [formerly 5e0157c4d7] [formerly 641d2b752ad685a72fc42fc4686cbf82924e2fe6 [formerly 03c0347b10]]
Former-commit-id: eeb75455cbb29ab57ec8e9ffb737e83dc8804974 [formerly 6ff906184b]
Former-commit-id: d918213077
This commit is contained in:
Bryan Kowal 2013-04-30 17:52:51 -05:00
parent b14b8d63cc
commit 0c688c4db7
7 changed files with 21 additions and 116 deletions

View file

@ -1 +0,0 @@
libpq.so.5.1

View file

@ -1 +0,0 @@
libpq.so.5.1

View file

@ -7,7 +7,6 @@ Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
Prefix: /awips2
URL: N/A
License: N/A
Distribution: N/A
@ -40,23 +39,18 @@ mkdir -p ${RPM_BUILD_ROOT}/awips2
%build
%install
NATIVE_TAR_FILE="dist.native/i386-pc-linux-gnu.tar"
FILES_NATIVE="%{_baseline_workspace}/files.native"
/bin/gtar -xpf %{_baseline_workspace}/${NATIVE_TAR_FILE} \
-C ${RPM_BUILD_ROOT}/awips2
# Remove Unnecessary Directories.
rm -rf ${RPM_BUILD_ROOT}/awips2/setup
rm -rf ${RPM_BUILD_ROOT}/awips2/edex
rm -rf ${RPM_BUILD_ROOT}/awips2/lib
rm -rf ${RPM_BUILD_ROOT}/awips2/awipsShare
/bin/cp -rf ${FILES_NATIVE}/adapt \
%{_build_root}/awips2/
if [ $? -ne 0 ]; then
exit 1
fi
%pre
%post
%preun
%postun
%clean

View file

@ -34,60 +34,24 @@ then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data
%build
%install
NATIVE_TAR_FILE="dist.native/i386-pc-linux-gnu.tar"
FILES_NATIVE="%{_baseline_workspace}/files.native"
# Untar the Native Library
/bin/gtar -xpf %{_baseline_workspace}/${NATIVE_TAR_FILE} \
-C ${RPM_BUILD_ROOT}/awips2
# Remove all unnecessary files and directories.
rm -rf ${RPM_BUILD_ROOT}/awips2/adapt
rm -rf ${RPM_BUILD_ROOT}/awips2/lib
rm -rf ${RPM_BUILD_ROOT}/awips2/setup
rm -rf ${RPM_BUILD_ROOT}/awips2/edex
mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/share
mv ${RPM_BUILD_ROOT}/awips2/awipsShare/hydroapps \
${RPM_BUILD_ROOT}/awips2/edex/data/share
rm -rf ${RPM_BUILD_ROOT}/awips2/awipsShare
# Add the ffmp_templates directory - part of the tar file now.
#mkdir -p ${RPM_BUILD_ROOT}/awips2/edex/data/hdf5/hydroapps/ffmp_templates
# Add file for VIM - part of the tar file now.
#WHFS_LOCAL="edex/data/hdf5/hydroapps/whfs/local/data"
#mkdir -p ${RPM_BUILD_ROOT}/awips2/${WHFS_LOCAL}/app/
#touch ${RPM_BUILD_ROOT}/awips2/${WHFS_LOCAL}/app/.vimrc
/bin/cp -rf ${FILES_NATIVE}/awipsShare \
%{_build_root}/awips2/edex/data/share
if [ $? -ne 0 ]; then
exit 1
fi
%pre
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Hydro Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = /awips2\e[m"
echo -e "\e[1;34m Destination = /awips2/edex/data/share/hydroapps\e[m"
%post
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Hydro Distribution Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II Hydro Distribution Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
%clean
rm -rf ${RPM_BUILD_ROOT}
@ -100,4 +64,4 @@ rm -rf ${RPM_BUILD_ROOT}
%dir /awips2/edex/data/share
%defattr(777,awips,fxalpha,777)
%dir /awips2/edex/data/share/hydroapps
/awips2/edex/data/share/hydroapps/*
/awips2/edex/data/share/hydroapps/*

View file

@ -1,36 +0,0 @@
#!/bin/bash
export DELTA_BUILD="11.3"
export DELTA_ID="A21Proto1"
export DELTA_DESC="Removing Any Existing FFMP Templates So New Ones Can Be Generated."
function runUpdate()
{
# Ensure that the awips2-hydroapps have been installed.
rpm -q awips2-hydroapps > /dev/null
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 0
fi
# Ensure that we know where awips2-hydroapps has been installed too.
if [ "${COMPONENT_INSTALL}" = "" ]; then
return 1
fi
return 0;
FFMP_TEMPLATE_DIR="${COMPONENT_INSTALL}/edex/data/hdf5/hydroapps/ffmp_templates"
# Ensure that the ffmp_template directory exists.
if [ ! -d ${FFMP_TEMPLATE_DIR} ]; then
return 0
fi
# Purge the existing ffmp templates.
rm -rf ${FFMP_TEMPLATE_DIR}/*
RC="$?"
if [ ! "${RC}" = "0" ]; then
return 1
fi
return 0
}

View file

@ -36,7 +36,7 @@ fi
if [ -d %{_build_root} ]; then
rm -rf %{_build_root}
fi
mkdir -p %{_build_root}/awips2
mkdir -p %{_build_root}/awips2/edex
if [ $? -ne 0 ]; then
exit 1
fi
@ -48,32 +48,16 @@ fi
%build
%install
DIST_NATIVE="%{_baseline_workspace}/dist.native"
FILES_NATIVE="%{_baseline_workspace}/files.native"
PACKAGES="%{_awipscm_share}/packages"
# extract the native libraries
/bin/tar -xpf ${DIST_NATIVE}/i386-pc-linux-gnu.tar \
-C %{_build_root}/awips2 ./edex/lib ./edex/bin
if [ $? -ne 0 ]; then
exit 1
fi
# purge all libpq with the exception of libpq 5.5
# temporary until a decision is made about the native tar file -
# almost any decision that is made will impact this rpm
_libpq_55="libpq.so.5.5"
_edex_native_path=%{_build_root}/awips2/edex/lib/native
_edex_linux32_path=${_edex_native_path}/linux32
/bin/cp -v ${_edex_linux32_path}/${_libpq_55} ${_edex_native_path}/${_libpq_55}
if [ $? -ne 0 ]; then
exit 1
fi
/bin/rm -fv ${_edex_linux32_path}/libpq.so*
if [ $? -ne 0 ]; then
exit 1
fi
/bin/mv -v ${_edex_native_path}/${_libpq_55} ${_edex_linux32_path}/${_libpq_55}
/bin/cp -rf ${FILES_NATIVE}/edex/lib \
${FILES_NATIVE}/edex/bin \
%{_build_root}/awips2/edex
if [ $? -ne 0 ]; then
exit 1
fi
# copy the AWIPS I mhs libraries
cp ${PACKAGES}/mhs/* \
%{_build_root}/awips2/edex/lib/native/linux32/awips1
@ -83,6 +67,7 @@ fi
%pre
%post
%preun
%postun