awips2/rpms/awips2.64/Installer.tpg/component.spec
Bryan Kowal 65e1e4ee0b Issue #202 - restoring rpm directory to ss_sync.
Former-commit-id: 56068aa96fa6daf113861476bf4b7aebe2021ca4
2012-01-20 13:38:00 -06:00

101 lines
No EOL
1.9 KiB
RPMSpec

%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%define _python_pkgs_dir "%{_baseline_workspace}/pythonPackages"
#
# AWIPS II Python tpg Spec File
#
Name: awips2-python-tpg
Summary: AWIPS II Python tpg Distribution - 64 Bit
Version: 3.1.2
Release: 1
Group: AWIPSII
BuildRoot: %{_build_root}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-tpg
%description
AWIPS II Python tpg Site-Package - 64-bit.
%prep
# Verify That The User Has Specified A BuildRoot.
if [ "%{_build_root}" = "/tmp" ]
then
echo "An Actual BuildRoot Must Be Specified. Use The --buildroot Parameter."
echo "Unable To Continue ... Terminating"
exit 1
fi
rm -rf %{_build_root}
mkdir -p %{_build_root}
mkdir -p %{_build_root}/build-python
%build
TPG_SRC_DIR="%{_python_pkgs_dir}/tpg"
TPG_TAR="TPG-3.1.2.tar.gz"
cp -v ${TPG_SRC_DIR}/${TPG_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_build_root}/build-python
tar -xvf ${TPG_TAR}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
rm -fv ${TPG_TAR}
if [ ! -d TPG-3.1.2 ]; then
file TPG-3.1.2
exit 0
fi
cd TPG-3.1.2
/awips2/python/bin/python setup.py build
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_build_root}/build-python/TPG-3.1.2
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
popd > /dev/null
rm -rf %{_build_root}/build-python
%pre
%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/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*