File euca2ools.spec of Package euca2ools
#
# spec file for package euca2ools
#
# Copyright (c) 2015 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: 3.0.4
Release: 0
Summary: Elastic Utility Computing Architecture Command Line Tools
License: BSD-2-Clause
Group: Productivity/Networking/System
Url: http://www.eucalyptus.com/download/euca2ools
Source0: %{name}-%{version}.tar.gz
Source1: euca2ools-rpmlintrc
BuildRequires: help2man
BuildRequires: make
BuildRequires: python-boto >= 2.1
BuildRequires: python-devel
BuildRequires: python-m2crypto
BuildRequires: python-xml
BuildRequires: python-distribute
Requires: python-base >= 2.6
Requires: python-boto >= 2.1
Requires: python-m2crypto
Requires: python-requests
Requires: python-six
Requires: python-requestbuilder
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()")}
%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
%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}
mkdir -p %{buildroot}/etc/euca2ools
cp conf/euca2ools.ini %{buildroot}/etc/euca2ools/
#sh -xe install-manpages.sh
%files
%defattr(-,root,root,-)
%doc COPYING README
%doc %{_mandir}/man1/*
%{_bindir}/*
%{python_sitelib}/euca2ools*
%{_sysconfdir}/euca2ools
%changelog