awips2/rpms/build/common/lookupRPM.sh

284 lines
8.9 KiB
Bash
Raw Normal View History

#!/bin/bash
# This is a simple utility script used to determine which specs file should be
# used to build a specified rpm by name.
function lookupRPM()
{
# Arguments:
# ${1} == the name of the rpm.
# Determine which directory we are running from.
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
rpms_dir=`cd ${dir}/../../../rpms; pwd;`
if [ $? -ne 0 ]; then
echo "ERROR: Unable to locate the rpm projects directory."
exit 1
fi
export RPM_SPECIFICATION=
export RPM_PROJECT_DIR=
awips2_ade_dir="${rpms_dir}/awips2.ade"
awips2_cave_dir="${rpms_dir}/awips2.cave"
awips2_core_dir="${rpms_dir}/awips2.core"
awips2_edex_dir="${rpms_dir}/awips2.edex"
awips2_qpid_dir="${rpms_dir}/awips2.qpid"
awips2_upc_dir="${rpms_dir}/awips2.upc"
python_site__dir="${rpms_dir}/python.site-packages"
installer_dir="${rpms_dir}/../installers/RPMs"
# lookup the rpm.
# foss rpms -> python rpms.
if [ "${1}" = "awips2-python" ]; then
export RPM_SPECIFICATION="${installer_dir}/python-2.7.8/"
return 0
fi
if [ "${1}" = "awips2-python-cherrypy" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.cherrypy"
return 0
fi
if [ "${1}" = "awips2-python-dynamicserialize" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.dynamicserialize"
return 0
fi
if [ "${1}" = "awips2-python-h5py" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.h5py"
return 0
fi
if [ "${1}" = "awips2-python-jimporter" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.jimporter"
return 0
fi
if [ "${1}" = "awips2-python-matplotlib" ]; then
export RPM_SPECIFICATION="${installer_dir}/matplotlib-1.2.0/"
return 0
fi
if [ "${1}" = "awips2-python-nose" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.nose"
return 0
fi
if [ "${1}" = "awips2-python-numpy" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.numpy"
return 0
fi
if [ "${1}" = "awips2-python-pil" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.pil"
return 0
fi
if [ "${1}" = "awips2-python-pmw" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.pmw"
return 0
fi
if [ "${1}" = "awips2-python-pupynere" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.pupynere"
return 0
fi
if [ "${1}" = "awips2-python-qpid" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.qpid"
return 0
fi
if [ "${1}" = "awips2-python-scientific" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.scientific"
return 0
fi
if [ "${1}" = "awips2-python-scipy" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.scipy"
return 0
fi
if [ "${1}" = "awips2-python-tables" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.tables"
return 0
fi
if [ "${1}" = "awips2-python-thrift" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.thrift"
return 0
fi
if [ "${1}" = "awips2-python-tpg" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.tpg"
return 0
fi
if [ "${1}" = "awips2-python-ufpy" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.ufpy"
return 0
fi
if [ "${1}" = "awips2-python-werkzeug" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.werkzeug"
return 0
fi
if [ "${1}" = "awips2-python-pygtk" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.pygtk"
return 0
fi
if [ "${1}" = "awips2-python-pycairo" ]; then
export RPM_SPECIFICATION="${python_site__dir}/Installer.pycairo"
return 0
fi
if [ "${1}" = "awips2-python-shapely" ]; then
export RPM_SPECIFICATION="${installer_dir}/shapely-1.4.4/"
return 0
fi
# awips2 rpms.
if [ "${1}" = "awips2-ncep-database" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.ncep-database"
return 0
fi
if [ "${1}" = "awips2-adapt-native" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.adapt-native"
return 0
fi
if [ "${1}" = "awips2-aviation-shared" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.aviation"
return 0
fi
if [ "${1}" = "awips2-cli" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.cli"
return 0
fi
if [ "${1}" = "awips2-database" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.database"
return 0
fi
if [ "${1}" = "awips2-database-server-configuration" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.database-server-configuration"
return 0
fi
if [ "${1}" = "awips2-database-standalone-configuration" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.database-standalone-configuration"
return 0
fi
if [ "${1}" = "awips2-gfesuite-client" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.gfesuite-client"
return 0
fi
if [ "${1}" = "awips2-gfesuite-server" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.gfesuite-server"
return 0
fi
if [ "${1}" = "awips2-hydroapps-shared" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.hydroapps"
return 0
fi
if [ "${1}" = "awips2-localapps-environment" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.localapps-environment"
return 0
fi
if [ "${1}" = "-localization" ]; then
return 0
fi
if [ "${1}" = "awips2-maps-database" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.maps-database"
return 0
fi
if [ "${1}" = "awips2-notification" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.notification"
return 0
fi
if [ "${1}" = "awips2-pypies" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.pypies"
return 0
fi
if [ "${1}" = "awips2-rcm" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.rcm"
return 0
fi
if [ "${1}" = "awips2-data.hdf5-topo" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.topo"
return 0
fi
if [ "${1}" = "awips2-data.gfe" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.gfe"
return 0
fi
if [ "${1}" = "awips2" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.version"
return 0
fi
if [ "${1}" = "awips2-common-base" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.common-base"
return 0
fi
# foss rpms.
if [ "${1}" = "-qpid" ]; then
return 0
fi
if [ "${1}" = "awips2-ant" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.ant"
return 0
fi
if [ "${1}" = "awips2-httpd-pypies" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.httpd-pypies"
return 0
fi
if [ "${1}" = "awips2-java" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.java"
return 0
fi
if [ "${1}" = "awips2-groovy" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.groovy"
return 0
fi
if [ "${1}" = "awips2-ldm" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.ldm"
return 0
fi
if [ "${1}" = "awips2-edex-upc" ]; then
export RPM_SPECIFICATION="${awips2_upc_dir}/Installer.edex-upc"
return 0
fi
Issue #1663 - PostgreSQL Upgrade - we are now building PostgreSQL 9.2.3 and psql 9.2.3 from source - we are building pgadmin3 1.16.1 from source - we can build both a 32-bit and 64-bit version of PostgreSQL, psql, and pgadmin3 - the following extensions are also built with PostgreSQL: * geos 3.3.7 * postgis 2.0.2 * proj 4.8.0 * gdal 1.9.2 - database creation scripts and configuration have been updated for compatibility - removed remaining references to prefixed psql and postgresql rpms - removed unused sql scripts from the baseline - we are now using modified versions of the PostgreSQL 9.2.3 postgresql.conf file - updated the postgresql jdbc drivers Change-Id: Ibe61cfcb2540cd4d8b9fae492688109d8bd715d8 Former-commit-id: 9e678feaf82bf6f972582ff3ec388ace04dfd7d3 [formerly db02ab18ed87ea3399938dffd5329158689d360f] [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3] [formerly 9e678feaf82bf6f972582ff3ec388ace04dfd7d3 [formerly db02ab18ed87ea3399938dffd5329158689d360f] [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3] [formerly 5e86ef080ef2e5be0f520be2f10006d63e3b1974 [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3 [formerly 98188e57e4ced9665827b1c2a2f74960c46f03dd]]]] Former-commit-id: 5e86ef080ef2e5be0f520be2f10006d63e3b1974 Former-commit-id: 0b6a31d7cac0aed18fdda7c658295e80913a1bd3 [formerly f6139755a59e2f27b3adf8adb5e6f7e65cdaa69f] [formerly 916fa7115cb561d798c47318a5834ec0854bf491 [formerly 58e035a024e8de9048940d33fe5c03b8e6452de0]] Former-commit-id: 53b06b05ba798c5f2f0c58de3b9cd5f1c88b5850 [formerly 1e9054ce15bcd52b637d72861113a16fe0490a09] Former-commit-id: ea0950d8364176b9c7d5e5a6d1dd6ecb538138e8
2013-03-12 14:38:00 -05:00
if [ "${1}" = "awips2-postgres" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.postgres"
return 0
fi
Issue #1663 - PostgreSQL Upgrade - we are now building PostgreSQL 9.2.3 and psql 9.2.3 from source - we are building pgadmin3 1.16.1 from source - we can build both a 32-bit and 64-bit version of PostgreSQL, psql, and pgadmin3 - the following extensions are also built with PostgreSQL: * geos 3.3.7 * postgis 2.0.2 * proj 4.8.0 * gdal 1.9.2 - database creation scripts and configuration have been updated for compatibility - removed remaining references to prefixed psql and postgresql rpms - removed unused sql scripts from the baseline - we are now using modified versions of the PostgreSQL 9.2.3 postgresql.conf file - updated the postgresql jdbc drivers Change-Id: Ibe61cfcb2540cd4d8b9fae492688109d8bd715d8 Former-commit-id: 9e678feaf82bf6f972582ff3ec388ace04dfd7d3 [formerly db02ab18ed87ea3399938dffd5329158689d360f] [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3] [formerly 9e678feaf82bf6f972582ff3ec388ace04dfd7d3 [formerly db02ab18ed87ea3399938dffd5329158689d360f] [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3] [formerly 5e86ef080ef2e5be0f520be2f10006d63e3b1974 [formerly 729bc9c4bb90f1bb6f3b43583eaeccb5332fe6a3 [formerly 98188e57e4ced9665827b1c2a2f74960c46f03dd]]]] Former-commit-id: 5e86ef080ef2e5be0f520be2f10006d63e3b1974 Former-commit-id: 0b6a31d7cac0aed18fdda7c658295e80913a1bd3 [formerly f6139755a59e2f27b3adf8adb5e6f7e65cdaa69f] [formerly 916fa7115cb561d798c47318a5834ec0854bf491 [formerly 58e035a024e8de9048940d33fe5c03b8e6452de0]] Former-commit-id: 53b06b05ba798c5f2f0c58de3b9cd5f1c88b5850 [formerly 1e9054ce15bcd52b637d72861113a16fe0490a09] Former-commit-id: ea0950d8364176b9c7d5e5a6d1dd6ecb538138e8
2013-03-12 14:38:00 -05:00
if [ "${1}" = "awips2-pgadmin3" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.pgadmin"
return 0
fi
if [ "${1}" = "awips2-tools" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.tools"
return 0
fi
if [ "${1}" = "awips2-eclipse" ]; then
export RPM_SPECIFICATION="${awips2_ade_dir}/Installer.eclipse"
return 0
fi
if [ "${1}" = "awips2-openfire" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.xmpp"
return 0
fi
if [ "${1}" = "awips2-collab-dataserver" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.collab-dataserver"
return 0
fi
if [ "${1}" = "awips2-yajsw" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.yajsw"
return 0
fi
# awips2 rpms -> viz rpms.
if [ "${1}" = "awips2-alertviz" ]; then
export RPM_SPECIFICATION="${awips2_cave_dir}/Installer.alertviz"
return 0
fi
if [ "${1}" = "-cave" ]; then
return 0
fi
# awips2 rpms -> edex rpms.
if [ "${1}" = "-edex" ]; then
return 0
fi
if [ "${1}" = "awips2-edex-environment" ]; then
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.edex-environment/edex"
return 0
fi
return 1
}