File euca2ools.spec of Package euca2ools
#
# spec file for package euca2ools
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: euca2ools
Version: 2.1.1
Release: 0
Summary: Elastic Utility Computing Architecture Command Line Tools
License: BSD-2-Clause
Group: Productivity/Networking/System
Url: http://open.eucalyptus.com/downloads
Source0: %{name}-%{version}.tar.gz
Patch0: euca2ools-manpage-perms.patch
BuildRequires: help2man
BuildRequires: make
BuildRequires: python-boto >= 2.1
BuildRequires: python-devel
BuildRequires: python-m2crypto
BuildRequires: python-xml
Requires: python-base >= 2.6
Requires: python-boto >= 2.1
Requires: python-m2crypto
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")}
%endif
%description
Euca2ools are command-line tools for interacting with Web services that
export a REST/Query-based API compatible with Amazon EC2 and S3 services.
The tools can be used with both Amazon's services and with installations
of the Eucalyptus open-source cloud-computing infrastructure.
%prep
%setup -q
%patch0 -p1
%build
%{__python} setup.py build
sh -xe generate-manpages.sh
%install
%{__python} setup.py install --prefix=%{_prefix} --skip-build --root %{buildroot}
%{__python} setup.py install -O1 --prefix=%{_prefix} --skip-build --root %{buildroot}
find "%{buildroot}%{python_sitelib}/" -name '*.pyo' -exec %__rm {} \;
find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \
-exec %__rm {} \;
%__python -c 'import compileall;
compileall.compile_dir("%{buildroot}%{python_sitelib}/",
ddir="%{python_sitelib}/",
force=1)'
export DESTDIR=%{buildroot}
export PREFIX=%{_prefix}
sh -xe install-manpages.sh
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING README
%doc %{_mandir}/man1/*
%{_bindir}/euca*
%{_bindir}/euare*
%{_bindir}/eustore-*
%{python_sitelib}/euca2ools*
%changelog