Omaha #4738 WA12.6 Updated SPEC files.

Change-Id: Ifa7c9b9342ffdf29c365d1f2bcce8969ad0ad6b0

Former-commit-id: dfefaf16dfa18ab504e93f3fa7b4d67488e315a7
This commit is contained in:
David Lovely 2015-12-08 07:40:35 -06:00
parent a54a33166e
commit 08607bbd50
16 changed files with 42 additions and 363 deletions

View file

@ -20,7 +20,11 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-eclipse
Provides: awips2-eclipse
Requires: awips2-ant
Requires: awips2-java
Requires: awips2-python
%description
AWIPS II Eclipse Distribution - Contains the AWIPS II Eclipse Distribution.
@ -68,36 +72,8 @@ rm -f %{_build_root}/awips2/eclipse/basemaps
rm -f %{_build_root}/awips2/eclipse/etc
%pre
JAVA_INSTALL="<Not Installed>"
PYTHON_INSTALL="<Not Installed>"
ANT_INSTALL="<Not Installed>"
INSTALL_PATH="/awips2/java"
if [ -d ${INSTALL_PATH} ]; then
JAVA_INSTALL=${INSTALL_PATH}
fi
INSTALL_PATH="/awips2/python"
if [ -d ${INSTALL_PATH} ]; then
PYTHON_INSTALL=${INSTALL_PATH}
fi
INSTALL_PATH="/awips2/ant"
if [ -d ${INSTALL_PATH} ]; then
ANT_INSTALL=${INSTALL_PATH}
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Eclipse Distribution...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Java Detected At: ${JAVA_INSTALL}\e[m"
echo -e "\e[1;34m Python Detected At: ${PYTHON_INSTALL}\e[m"
echo -e "\e[1;34m Ant Detected At: ${ANT_INSTALL}\e[m"
%post
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Creating ADE Eclipse Desktop Shortcut...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
ADE_ECLIPSE_SHORTCUT="ade-eclipse"
SHORTCUT_OWNER="${USER}"
CREATE_SHORTCUT="true"
@ -150,10 +126,6 @@ if [ "${CREATE_SHORTCUT}" = "true" ]; then
sudo -u ${SHORTCUT_OWNER} chmod 644 ${SHORTCUT}
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Eclipse Distribution Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun

View file

@ -1,249 +0,0 @@
%define _component_zip_file_name %{_component_feature}-repo-linux.%{_build_arch}.zip
#
# awips2-cave Spec File
#
%define __prelink_undo_cmd %{nil}
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-java-repack-jars[[:space:]].*$!!g')
Name: %{_component_name}
Summary: %{_component_name} Installation
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: %{_component_name} = %{_component_version}
requires: awips2-cave
requires: %{_downstream_requires}
requires: awips2
%description
%{_component_desc}
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "${RPM_BUILD_ROOT}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
if [ -d ${RPM_BUILD_ROOT} ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
%build
%install
CAVE_DIST_DIR="%{_baseline_workspace}/rpms/awips2.cave/setup/dist"
if [ ! -f ${CAVE_DIST_DIR}/%{_component_zip_file_name} ]; then
echo "ERROR: Unable to find - ${CAVE_DIST_DIR}/%{_component_zip_file_name}."
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/cave/.repository
if [ $? -ne 0 ]; then
exit 1
fi
cp ${CAVE_DIST_DIR}/%{_component_zip_file_name} \
${RPM_BUILD_ROOT}/awips2/cave/.repository
if [ $? -ne 0 ]; then
exit 1
fi
%pre
# Ensure that CAVE is available to backup and to use to
# apply p2 updates.
if [ ! -f /awips2/cave/cave ]; then
echo "ERROR: The cave executable was not found or is corrupt - /awips2/cave/cave;"
echo " awips2-cave must be re-installed. This installation will be terminated."
exit 1
fi
%post
function cleanupUnzip()
{
if [ -f /awips2/cave/.repository/artifacts.xml ]; then
rm -f /awips2/cave/.repository/artifacts.xml
fi
if [ -f /awips2/cave/.repository/content.xml ]; then
rm -f /awips2/cave/.repository/content.xml
fi
if [ -d /awips2/cave/.repository/features ]; then
rm -rf /awips2/cave/.repository/features
fi
if [ -d /awips2/cave/.repository/plugins ]; then
rm -rf /awips2/cave/.repository/plugins
fi
}
# Set all paths required by CAVE before installing.
export LD_LIBRARY_PATH=/awips2/java/lib:/awips2/python/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=libpython.so
if [ -d /awips2/cave/lib ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib/lib_illusion:$LD_LIBRARY_PATH
fi
if [ -d /awips2/cave/lib64 ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib64/lib_illusion:$LD_LIBRARY_PATH
fi
# Need to use awips2-java to do this.
export PATH=/awips2/java/bin:/awips2/python/bin:${PATH}
export JAVA_HOME="/awips2/java/jre"
# Set the CAVE logfile location.
export LOGFILE_CAVE=/dev/null
# Use the eclipse p2 manager.
CAVE_EXE="/awips2/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination /awips2/cave"
INSTALL_ARG="-i %{_component_feature}.feature.group"
UNINSTALL_ARG="-u %{_component_feature}.feature.group"
REPO="-repository file:/awips2/cave/.repository/"
COMMON_CMD="${CAVE_EXE} ${NOSPLASH_ARG} ${DIRECTOR_APP} ${DESTINATION_ARG}"
INSTALL_CMD="${COMMON_CMD} ${INSTALL_ARG} ${REPO}"
UNINSTALL_CMD="${COMMON_CMD} ${UNINSTALL_ARG}"
# Uninstall any existing components since the p2 director does not
# support updating.
# If the feature is not installed, this does not fail quietly.
# Determine if the feature needs to be uninstalled.
${UNINSTALL_CMD} -verifyOnly > /dev/null 2>&1
RC=$?
if [ ${RC} -eq 0 ]; then
LOG_TIMESTAMP=`date`
echo "uninstall previous STARTED: ${LOG_TIMESTAMP}"
${UNINSTALL_CMD}
LOG_TIMESTAMP=`date`
echo "uninstall previous COMPLETE: ${LOG_TIMESTAMP}"
fi
# unzip the repository
cd /awips2/cave/.repository
cleanupUnzip
unzip %{_component_zip_file_name} > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: Unzip of repository FAILED."
exit 1
fi
# Install the component.
LOG_TIMESTAMP=`date`
echo "installation STARTED: ${LOG_TIMESTAMP}"
${INSTALL_CMD}
if [ $? -ne 0 ]; then
exit 1
fi
LOG_TIMESTAMP=`date`
echo "installation COMPLETE: ${LOG_TIMESTAMP}"
# Cleanup the unzip
cleanupUnzip
# move localization files in unpacked plugins to the
# cave etc directory.
if [ ! -d /awips2/cave/etc ]; then
mkdir -p /awips2/cave/etc
if [ $? -ne 0 ]; then
exit 1
fi
fi
pushd . > /dev/null 2>&1
cd /awips2/cave/plugins
for localizationDirectory in `find . -maxdepth 2 -name localization -type d`;
do
# copy the contents of the localization directory to the
# etc directory.
cp -r ${localizationDirectory}/* /awips2/cave/etc
if [ $? -ne 0 ]; then
exit 1
fi
# remove the localization directory.
rm -rf ${localizationDirectory}
if [ $? -ne 0 ]; then
exit 1
fi
done
popd > /dev/null 2>&1
%preun
# Do not use p2 to remove the feature if this is an upgrade.
if [ "${1}" = "1" ]; then
exit 0
fi
# Ensure that CAVE is available.
if [ ! -f /awips2/cave/cave ]; then
# Even though we are not correctly uninstalled, there is nothing
# we can do about that because of an rpm bug. If the user is
# uninstalling then they will need to remove what is left of
# /awips2 anyway.
exit 0
fi
# Ensure that awips2-java is available.
if [ ! -f /awips2/java/bin/java ]; then
exit 0
fi
# Ensure that awips2-python is available.
if [ ! -f /awips2/python/bin/python ]; then
exit 0
fi
# Set all paths required by CAVE before installing.
export LD_LIBRARY_PATH=/awips2/java/lib:/awips2/python/lib:$LD_LIBRARY_PATH
export LD_PRELOAD=libpython.so
if [ -d /awips2/cave/lib ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib/lib_illusion:$LD_LIBRARY_PATH
fi
if [ -d /awips2/cave/lib64 ]; then
export LD_LIBRARY_PATH=/awips2/cave/lib64/lib_illusion:$LD_LIBRARY_PATH
fi
# Need to use awips2-java to do this.
export PATH=/awips2/java/bin:/awips2/python/bin:${PATH}
export JAVA_HOME="/awips2/java/jre"
# Set the CAVE logfile location.
export LOGFILE_CAVE=/dev/null
# Use the eclipse p2 manager.
CAVE_EXE="/awips2/cave/cave"
NOSPLASH_ARG="-nosplash"
DIRECTOR_APP="-application org.eclipse.equinox.p2.director"
DESTINATION_ARG="-destination /awips2/cave"
UNINSTALL_ARG="-u %{_component_feature}.feature.group"
COMMON_CMD="${CAVE_EXE} ${NOSPLASH_ARG} ${DIRECTOR_APP} ${DESTINATION_ARG}"
UNINSTALL_CMD="${COMMON_CMD} ${UNINSTALL_ARG}"
LOG_TIMESTAMP=`date`
echo "uninstall STARTED: ${LOG_TIMESTAMP}"
${UNINSTALL_CMD}
LOG_TIMESTAMP=`date`
echo "uninstall COMPLETE: ${LOG_TIMESTAMP}"
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/cave/.repository
/awips2/cave/.repository/*

View file

@ -15,8 +15,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-adapt-native
requires: awips2-edex-base
Provides: awips2-adapt-native
Requires: awips2-edex-base
# The two python native libraries are now included directly in the python
# distribution that is built.

View file

@ -15,8 +15,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-aviation-shared
requires: awips2-edex-base
Provides: awips2-aviation-shared
Requires: awips2-edex-base
%description
AWIPS II Aviation Distribution - includes *-ish files required by AvnFPS.

View file

@ -19,8 +19,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-cli
requires: awips2-python
Provides: awips2-cli
Requires: awips2-python
%description
AWIPS II CLI Installation - Contains The AWIPS II CLI Component.
@ -83,39 +83,16 @@ cp %{_baseline_workspace}/${PROFILE_D_DIRECTORY}/* \
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II CLI...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
if [ "${1}" = "2" ]; then
exit 0
fi
PYTHON_INSTALL="/awips2/python"
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II CLI Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
}
echo "--------------------------------------------------------------------------------"
echo "\| Setting up AWIPS II CLI Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II CLI Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II CLI Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%clean
rm -rf ${RPM_BUILD_ROOT}

View file

@ -15,9 +15,9 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
requires: awips2-postgresql
provides: awips2-database-server-configuration
provides: awips2-database-configuration
Requires: awips2-postgresql
Provides: awips2-database-server-configuration
Provides: awips2-database-configuration
%description
AWIPS II Database Server Configuration - contains the AWIPS II server

View file

@ -15,9 +15,9 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
requires: awips2-postgresql
provides: awips2-database-standalone-configuration
provides: awips2-database-configuration
Requires: awips2-postgresql
Provides: awips2-database-standalone-configuration
Provides: awips2-database-configuration
%description
AWIPS II Database Server Configuration - contains the AWIPS II server

View file

@ -20,13 +20,13 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-database
provides: awips2-static-user
requires: awips2-postgresql
requires: awips2-psql
requires: awips2-database-configuration
requires: netcdf = 4.1.2
requires: netcdf-devel = 4.1.2
Provides: awips2-database
Provides: awips2-static-user
Requires: awips2-postgresql
Requires: awips2-psql
Requires: awips2-database-configuration
Requires: netcdf = 4.1.2
Requires: netcdf-devel = 4.1.2
%description

View file

@ -17,7 +17,7 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-data.gfe
Provides: awips2-data.gfe
%description
AWIPS II gfe Distribution - Contains the AWIP II gfe netcdf files.

View file

@ -16,8 +16,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-groovy
requires: awips2-java
Provides: awips2-groovy
Requires: awips2-java
%description
AWIPS II Groovy Distribution - Contains Groovy %{_groovy_version}.

View file

@ -16,9 +16,9 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-hydroapps-shared
obsoletes: awips2-hydroapps
requires: awips2-edex-base
Provides: awips2-hydroapps-shared
Obsoletes: awips2-hydroapps
Requires: awips2-edex-base
%description
AWIPS II Hydroapps Distribution - Includes applications, configurations, and

View file

@ -15,8 +15,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-irt
requires: awips2-python
Provides: awips2-irt
Requires: awips2-python
%description
AWIPS II IRT Installation - Contains The AWIPS II IRT Component.
@ -91,38 +91,17 @@ done
copyLegal "irt"
%pre
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing AWIPS II IRT...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Installation Root = ${RPM_INSTALL_PREFIX}\e[m"
%post
function printFailureMessage()
{
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;31m\| AWIPS II IRT Installation - FAILED\e[m"
echo -e "\e[1;31m--------------------------------------------------------------------------------\e[m"
}
echo ${RPM_INSTALL_PREFIX} | sed 's/\//\\\//g' > .awips2_escape.tmp
IRT_INSTALL_ESCAPED=`cat .awips2_escape.tmp`
rm -f .awips2_escape.tmp
echo "--------------------------------------------------------------------------------"
echo "\| Setting up AWIPS II IRT Runtime and Environment..."
echo "--------------------------------------------------------------------------------"
IRT_STARTUP_FILE="start_irt.sh"
perl -p -i -e "s/%{INSTALL_PATH}%/${IRT_INSTALL_ESCAPED}/g" \
${RPM_INSTALL_PREFIX}/bin/${IRT_STARTUP_FILE}
chmod a+x ${RPM_INSTALL_PREFIX}/bin/*
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II IRT Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%postun
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II IRT Installation Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%files -f component-files.txt

View file

@ -15,7 +15,7 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: %{_component_name}
Provides: %{_component_name}
%description
AWIPS II Site Localization.

View file

@ -17,8 +17,8 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-maps-database
requires: awips2-database
Provides: awips2-maps-database
Requires: awips2-database
%description
AWIPS II Maps Database - includes the

View file

@ -18,10 +18,10 @@ Vendor: NCEP/NCO/SIB CWA
Packager: %{_build_site}
AutoReq: no
provides: awips2-ncep-database
requires: awips2-database
requires: awips2-postgresql
requires: awips2-psql
Provides: awips2-ncep-database
Requires: awips2-database
Requires: awips2-postgresql
Requires: awips2-psql
%description
AWIPS II NCEP Database Installation - This rpm creates the ncep database and tables.

View file

@ -14,9 +14,9 @@ Vendor: Raytheon
Packager: %{_build_site}
AutoReq: no
provides: awips2-pypies
requires: awips2-python >= 2.7-1
requires: awips2-tools
Provides: awips2-pypies
Requires: awips2-python >= 2.7-1
Requires: awips2-tools
%description
AWIPS II PyPIES Installation - Sets Up AWIPS II PyPIES.