awips2/rpms/awips2.core/Installer.gfesuite/component.spec

85 lines
1.9 KiB
RPMSpec

#
# AWIPS II gfesuite Spec File
#
Name: awips2-gfesuite
Summary: AWIPS II gfesuite Installation
Version: %{_component_version}
Release: %{_component_release}%{?dist}
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch
URL: N/A
License: N/A
Distribution: N/A
Vendor: %{_build_vendor}
Packager: %{_build_site}
AutoReq: no
Provides: awips2-gfesuite
Requires: numpy
Requires: awips2-python
Requires: awips2-java
Obsoletes: awips2-gfesuite-server, awips2-gfesuite-client
BuildRequires: awips2-ant
BuildRequires: awips2-java
%description
AWIPS II gfesuite Installation - Contains The AWIPS II gfesuite Component.
# 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')
%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
%build
%install
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite
if [ $? -ne 0 ]; then
exit 1
fi
GFESUITE_PROJECT="com.raytheon.uf.tools.gfesuite"
GFESUITE_DEPLOY_SCRIPT="%{_baseline_workspace}/${GFESUITE_PROJECT}/deploy.xml"
/awips2/ant/bin/ant -f ${GFESUITE_DEPLOY_SCRIPT} \
-Dinstall.dir=${RPM_BUILD_ROOT}/awips2/GFESuite \
-Dinstaller=true
RC=$?
if [ ${RC} -ne 0 ]; then
echo "ERROR: ant failed."
exit 1
fi
# Create additional directories that are required.
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/exportgrids/primary
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/exportgrids/backup
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ISC
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p ${RPM_BUILD_ROOT}/awips2/GFESuite/products/ATBL
if [ $? -ne 0 ]; then
exit 1
fi
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/GFESuite
/awips2/GFESuite/*