awips2/rpms/python.site-packages/Installer.pycairo/component.spec
Brian Graham e1b4c4abe3 ASM #15662 - Updated spec files to include AWIPS version
Change-Id: If8f78761550355a1ec55b6abde594583821d4d9f

Former-commit-id: 11741b03db9424aa10086553729303fa23a7366f
2014-12-09 09:25:59 -05:00

91 lines
1.9 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 pycairo Spec File
#
Name: awips2-python-pycairo
Summary: AWIPS II Python pycairo Distribution
Version: 1.2.2
Release: %{_component_version}.%{_component_release}
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
URL: N/A
License: N/A
Distribution: N/A
Vendor: Raytheon
Packager: Bryan Kowal
AutoReq: no
requires: awips2-python
provides: awips2-python-pycairo
%description
AWIPS II Python pycairo 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
PYCAIRO_SRC_DIR="%{_python_pkgs_dir}/pycairo"
PYCAIRO_TAR="pycairo-1.2.2.tar.gz"
cp -v ${PYCAIRO_SRC_DIR}/${PYCAIRO_TAR} \
%{_python_build_loc}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd %{_python_build_loc}
tar -xvf ${PYCAIRO_TAR}
if [ $? -ne 0 ]; then
exit 1
fi
cd pycairo-1.2.2
./configure --prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
make
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
%install
pushd . > /dev/null
cd %{_python_build_loc}/pycairo-1.2.2
make install prefix=%{_build_root}/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
%clean
rm -rf %{_python_build_loc}
rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib
/awips2/python/lib/*
%dir /awips2/python/include
/awips2/python/include/*