File python-azurectl.spec of Package python-azurectl.1119

#
# spec file for package python-azurectl
#
Name:           python-azurectl
Version:        1.0.1
Release:        0
Url:            https://github.com/SUSE/azurectl
Summary:        Command Line Interface to manage Microsoft Azure services
License:        GPL-2.0
Group:          Development/Languages/Python
Source:         python-azurectl-%{version}.tar.gz
Source1:        python-azurectl-completion-%{version}.tar.gz
Source2:        python-azurectl-man-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Requires:       python-docopt
Requires:       python-APScheduler
Requires:       python-pyliblzma
Requires:       python-azure-sdk >= 0.20.0
Requires:       python-dateutil
Requires:       python-dnspython
Requires:       man
Requires:       openssl
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%description
Management tool for the Microsoft Azure public cloud service.
It allows uploading, registering and maintaining OS images for
multiple Azure Account Subscriptions.

%prep
%setup -q -n azurectl-%{version} -b1 -b2

%build
python setup.build.py build

%install
python setup.build.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}/etc/bash_completion.d
cp completion/azurectl.sh %{buildroot}/etc/bash_completion.d

mkdir -p %{buildroot}/%{_mandir}/man1
for i in doc/man/*.gz; do \
    install -m 644 $i %{buildroot}/usr/share/man/man1 ;\
done

%files
%defattr(-,root,root,-)
%{_bindir}/azurectl
%{python_sitelib}/azurectl-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/azurectl
%config /etc/bash_completion.d/azurectl.sh
%doc %{_mandir}/man1/*
%changelog
openSUSE Build Service is sponsored by