awips2/rpms/python.site-packages/Installer.gfe/component.spec
2016-10-13 17:53:40 -05:00

90 lines
2.6 KiB
RPMSpec

%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _build_arch %(uname -i)
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
%define _python_build_loc %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#
# GFE Python gfe Spec File
#
Name: awips2-python-gfe
Summary: AWIPS II Python GFE Files
Version: 1.0.0
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
URL: N/A
License: N/A
Distribution: N/A
Vendor: %{_build_vendor}
Packager: %{_build_site}
AutoReq: no
requires: awips2-python
provides: awips2-python-gfe
%description
AWIPS II Python GFE Site-Package
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "" ]
then
echo "A Build Root has not been specified."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
if [ $? -ne 0 ]; then
exit 1
fi
%build
%install
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/gfe
if [ $? -ne 0 ]; then
exit 1
fi
cp -rv %{_baseline_workspace}/com.raytheon.uf.common.localization.python/utility/common_static/base/python/* \
%{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/
cp -rv %{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/python/gfe/*.py \
%{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/
cp -rv %{_baseline_workspace}/com.raytheon.edex.plugin.gfe/utility/common_static/base/python/*.py \
%{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/
cp -rv %{_baseline_workspace}/com.raytheon.uf.common.python/utility/common_static/base/python/*.py \
%{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/
cp -rv %{_baseline_workspace}/com.raytheon.uf.common.status/utility/common_static/base/python/*.py \
%{_build_root}/awips2/python/lib/python2.7/site-packages/gfe/
mkdir -p %{_build_root}/awips2/python/lib/python2.7/site-packages/vtec
if [ $? -ne 0 ]; then
exit 1
fi
cp -rv %{_baseline_workspace}/com.raytheon.uf.edex.activetable/utility/common_static/base/vtec/*.py \
%{_build_root}/awips2/python/lib/python2.7/site-packages/vtec
%pre
if [ -d /awips2/python/lib/python2.7/site-packages/gfe ]; then
rm -rf /awips2/python/lib/python2.7/site-packages/gfe
fi
if [ -d /awips2/python/lib/python2.7/site-packages/vtec ]; then
rm -rf /awips2/python/lib/python2.7/site-packages/vtec
fi
%post
%preun
%postun
%clean
rm -rf %{_build_root}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*