File openlmi-tools.spec of Package openlmi-tools

# spec file for package openlmi-tools
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Redhat, Inc
# 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

Name:           openlmi-tools
Version:        0.10.5
Release:        0
%if 0%{?suse_version}
Summary:        Tooling around openLMI
License:        GPL-2.0
Group:          System/Management
%if 0%{?suse_version} > 1110
# SLE11 has Python site-dir below /usr/lib64
BuildArch:      noarch

%if 0%{?suse_version} == 1110
# Python 2.6 vs 2.7 dict creation syntax change,
# See
Patch:          python-2.6.patch

BuildRequires:  ImageMagick
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  openlmi-python-base
BuildRequires:  openwsman-python
BuildRequires:  python-docopt
BuildRequires:  python-pywbem
BuildRequires:  python-sphinx
BuildRequires:  python-sphinx_rtd_theme
%if 0%{?suse_version} < 1120
# SLE11 needs explicit BuildRoot
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# Python 2.6 needs argparse
BuildRequires:  python-argparse
%if 0%{?suse_version}
BuildRequires:  python
BuildRequires:  python-M2Crypto
BuildRequires:  python-pyparsing
%if 0%{?suse_version} > 1110
BuildRequires:  python-ply
BuildRequires:  python-pyOpenSSL
BuildRequires:  python-openssl
Requires:       m2crypto
Requires:       pyparsing
Requires:       python2

%if 0%{?suse_version} > 1010
BuildRequires:  fdupes

# sblim-sfcb or tog-pegasus
# (required to be present during install/uninstall for registration)
Requires:       cim-server
Requires(pre):  cim-server
Requires(preun): cim-server
Requires(post): cim-server

# Just because we have wired python's scripts
# Remove in future
BuildRequires:  python-setuptools

%{name} is set of tools to build and work with openLMI providers

%setup -q
%if 0%{?suse_version} == 1110
%patch -p1

cp %{S:1} doc/src
PAPER=a4 make

cd cli
python install --root="%{buildroot}" --prefix=%{_prefix}
install -d %{buildroot}%{_mandir}/man1
install -pm0644 man/lmi.1 %{buildroot}%{_mandir}/man1

%if 0%{?suse_version} > 1010
%fdupes %{buildroot}

%dir %{python_sitelib}/lmi
%dir %{python_sitelib}/openlmi_tools-*-info

openSUSE Build Service is sponsored by