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.0.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.bz2
# PATCH-FIX-UPSTREAM euca2ools-2.0.1_mkFile-fixes.patch
Patch0:         euca2ools-2.0.1_mkFile-fixes.patch
# PATCH-FIX-UPSTREAM euca2ools_noHashBang.patch
Patch1:         euca2ools_noHashBang.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
%patch1

%build
%{__make} man

%install
%makeinstall PREFIX=%{_prefix} MANPREFIX=%{_prefix}/share
find "%{buildroot}%{python_sitelib}/" -name '*.pyc' \
    -exec %__rm {} \;
%__python -c 'import compileall;
compileall.compile_dir("%{buildroot}%{python_sitelib}/",
ddir="%{python_sitelib}/",
force=1)'

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING README
%doc %{_mandir}/man1/*
%{_bindir}/euca*
%{_bindir}/euare*
%{python_sitelib}/euca2ools*

%changelog
openSUSE Build Service is sponsored by