# # AWIPS II Python thrift Site-Package Spec File # Name: awips2-python-thrift Summary: AWIPS II Python thrift Site-Package Version: 20080411p1 Release: 2 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-thrift %define _docdir python.thrift %description AWIPS II Python thrift Site-Package - Installs the AWIPS II Python thrift 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/thrift %build %install SITE_PACKAGE_SRC_DIR="pythonPackages/thrift" # Copy our site-package source cp -r ${WORKSPACE_DIR}/${SITE_PACKAGE_SRC_DIR}/* \ ${RPM_BUILD_ROOT}//awips2/python/lib/python2.7/site-packages/thrift %pre if [ -d /usr/share/doc/awips2/%{_docdir} ]; then rm -rf /usr/share/doc/awips2/%{_docdir} fi PYTHON_INSTALL="/awips2/python" echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m\| Installing the AWIPS II Python thrift Site-Package...\e[m" echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m Python Install Root = ${PYTHON_INSTALL}\e[m" %post echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;32m\| AWIPS II Python thrift Site-Package Installation - COMPLETE\e[m" echo -e "\e[1;32m--------------------------------------------------------------------------------\e[m" %preun %postun echo -e "\e[1;34m--------------------------------------------------------------------------------\e[m" echo -e "\e[1;34m\| The AWIPS II Python thrift 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/*