awips2/rpms/python.site-packages/Installer.ufpy/component.spec
Bryan Kowal a89f0a64f0 Issue #202 - restoring rpm directory to ss_sync.
Former-commit-id: d537df4ab0 [formerly 4453ad2d10] [formerly 65e1e4ee0b] [formerly d537df4ab0 [formerly 4453ad2d10] [formerly 65e1e4ee0b] [formerly ea1c82452b [formerly 65e1e4ee0b [formerly 56068aa96fa6daf113861476bf4b7aebe2021ca4]]]]
Former-commit-id: ea1c82452b
Former-commit-id: 69f4822ad1 [formerly 9f6780c4dd] [formerly e63dac039e52161602915d3cf34685762acd5d9e [formerly 7f1b468010]]
Former-commit-id: ed7bf459df1503ce7bd9500dc984c56a535b768f [formerly dafb6b18d8]
Former-commit-id: bb662ca175
2012-01-20 13:38:00 -06:00

84 lines
No EOL
2.5 KiB
RPMSpec

#
# AWIPS II Python ufpy Site-Package Spec File
#
Name: awips2-python-ufpy
Summary: AWIPS II Python ufpy Site-Package
Version: %{_component_version}
Release: %{_component_release}
Group: AWIPSII
BuildRoot: /tmp
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-ufpy
%define _docdir python.ufpy
%description
AWIPS II Python ufpy Site-Package - Installs the AWIPS II Python
ufpy Site-Package in the Python installation.
# 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
mkdir -p ${RPM_BUILD_ROOT}/awips2/python/lib/python2.7/site-packages/ufpy
%build
%install
SITE_PACKAGE_SRC_DIR="pythonPackages/ufpy"
# Copy our site-package source
cp -r ${WORKSPACE_DIR}/${SITE_PACKAGE_SRC_DIR}/* \
${RPM_BUILD_ROOT}/awips2/python/lib/python2.7/site-packages/ufpy
%pre
if [ -d /usr/share/doc/awips2/%{_docdir} ]; then
rm -rf /usr/share/doc/awips2/%{_docdir}
fi
if [ "${1}" = "2" ]; then
exit 0
fi
PYTHON_INSTALL="/awips2/python"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| Installing the AWIPS II Python ufpy Site-Package...\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m Python Install Root = ${PYTHON_INSTALL}\e[m"
%post
if [ "${1}" = "2" ]; then
exit 0
fi
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;32m\| AWIPS II Python ufpy Site-Package Installation - COMPLETE\e[m"
echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m"
%preun
%postun
if [ "${1}" = "1" ]; then
exit 0
fi
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo -e "\e[1;34m\| The AWIPS II Python ufpy Site-Package Has Been Successfully Removed\e[m"
echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m"
echo ""
%files
%defattr(644,awips,fxalpha,755)
/awips2/python/lib/python2.7/site-packages/*