awips2/rpms/python.site-packages/Installer.tpg/component.spec
Bryan Kowal 832f4a5250 Issue - python rpm specification and awips2-notification compatibility with RedHat 6
Former-commit-id: 61b14897fd [formerly 2b4faafed7] [formerly e3e596eb5d] [formerly 61b14897fd [formerly 2b4faafed7] [formerly e3e596eb5d] [formerly be011d3b92 [formerly e3e596eb5d [formerly f2497ff20afefdcf67b0b4bcc17f9ee358d2288d]]]]
Former-commit-id: be011d3b92
Former-commit-id: 5185e79785 [formerly 6561efe457] [formerly 475cbcc55e42aa6fa76623a7fa80a66662613073 [formerly 7b1615ba80]]
Former-commit-id: 30dc8c2a9b14c42729bb6d14f3cdcd806be041dd [formerly 8331e2a16a]
Former-commit-id: f61b437746
2013-08-15 15:24:11 -05:00

105 lines
2 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)
#
# AWIPS II Python tpg Spec File
#
Name: awips2-python-tpg
Summary: AWIPS II Python tpg Distribution
Version: 3.1.2
Release: 3
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: noarch
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
%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}
mkdir -p %{_build_root}
if [ -d %{_python_build_loc} ]; then
rm -rf %{_python_build_loc}
fi
mkdir -p %{_python_build_loc}
%build
TPG_SRC_DIR="%{_python_pkgs_dir}/tpg"
TPG_TAR="TPG-3.1.2.tar.gz"
cp -v ${TPG_SRC_DIR}/${TPG_TAR} \
%{_python_build_loc}
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_python_build_loc}
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 %{_python_build_loc}/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
%pre
%post
%preun
%postun
%clean
rm -rf %{_build_root}
rm -rf %{_python_build_loc}
%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/*