File spacewalk-remote-utils.spec of Package spacewalk-remote-utils.722

#
# spec file for package spacewalk-remote-utils
#
# Copyright (c) 2015 SUSE LINUX 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/
#


%if 0%{?rhel} && 0%{?rhel} < 6
%{!?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(1))")}
%endif

Name:           spacewalk-remote-utils
Version:        2.1.3.10
Release:        0
Summary:        Utilities to interact with a Spacewalk server remotely.
License:        GPL-2.0
Group:          Applications/System

Url:            http://fedorahosted.org/spacewalk
Source:         spacewalk-remote-utils-git-0.e6c729a.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%if  0%{?rhel} && 0%{?rhel} < 6
Requires:       rhnlib >= 2.5.22-6
%else
Requires:       rhnlib >= 2.5.22-10
%endif
BuildRequires:  docbook-utils
BuildRequires:  python-devel
%if 0%{?suse_version}
# provide directories for filelist check in OBS
BuildRequires:  rhn-client-tools
%endif

%description
Utilities to interact with a Spacewalk server remotely over XMLRPC.

%prep
%setup -q -n spacewalk-remote-utils-git-0.e6c729a

%build
docbook2man ./spacewalk-create-channel/doc/spacewalk-create-channel.sgml -o ./spacewalk-create-channel/doc/

%install
%{__rm} -rf %{buildroot}

%{__mkdir_p} %{buildroot}/%{_bindir}
%{__install} -p -m0755 spacewalk-add-providers/spacewalk-add-providers %{buildroot}/%{_bindir}/
%{__install} -p -m0755 spacewalk-create-channel/spacewalk-create-channel %{buildroot}/%{_bindir}/

%{__mkdir_p} %{buildroot}/%{_datadir}/rhn/channel-data
%{__install} -p -m0644 spacewalk-create-channel/data/* %{buildroot}/%{_datadir}/rhn/channel-data/

%{__mkdir_p} %{buildroot}/%{_mandir}/man1
%{__gzip} -c ./spacewalk-create-channel/doc/spacewalk-create-channel.1 > %{buildroot}/%{_mandir}/man1/spacewalk-create-channel.1.gz

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

%files
%defattr(-,root,root,-)
%{_bindir}/spacewalk-add-providers
%{_bindir}/spacewalk-create-channel
#%{python_sitelib}/spacecmd/
%{_datadir}/rhn/channel-data/
%if 0%{?suse_version}
%dir %{_datadir}/rhn
%endif

%doc spacewalk-create-channel/doc/README spacewalk-create-channel/doc/COPYING
%doc %{_mandir}/man1/spacewalk-create-channel.1.gz

%changelog
openSUSE Build Service is sponsored by