File bmap-tools.spec of Package bmap-tools

#
# spec file for package bmap-tools
#
#
# 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 https://bugs.opensuse.org/
#


%define rc_str %{?rc_num:0.rc%{rc_num}}%{!?rc_num:1}
Name:           bmap-tools
Version:        3.6
Summary:        Tools to generate block map (AKA bmap) and flash images using bmap
License:        GPL-2.0-only
Group:          Development/Tools/Other
URL:            https://github.com/intel/bmap-tools
Source0:        https://github.com/intel/bmap-tools/archive/v%{version}.tar.gz#./%{name}-%{version}.tar.gz
BuildRequires:  python2-rpm-macros
Requires:       bzip2
Requires:       gzip
Requires:       lzop
Requires:       pbzip2
Requires:       tar
Requires:       unzip
Requires:       xz
BuildArch:      noarch
%if 0%{?opensuse_bs}
Release:        %{rc_str}.<CI_CNT>.<B_CNT>
%else
Release:        %{rc_str}.0.0
%endif
%if ! 0%{?tizen_version:1}
# pigz is not present in Tizen
Requires:       pigz
%endif
%if 0%{?suse_version}
BuildRequires:  python-distribute
%endif
%if 0%{?fedora_version}
BuildRequires:  python-setuptools
%endif
%if 0%{?suse_version}
# The gpgme python module is in python-gpgme
Requires:       python-gpgme
# In OpenSuse the xml.etree module is provided by the python-xml package
Requires:       python-xml
%endif
%if 0%{?fedora_version}
# Tha gpgme python module is in pygpgme package
Requires:       pygpgme
# In Fedora the xml.etree module is provided by the python-libs package
Requires:       python-libs
%endif
# Centos6 uses python 2.6, which does not have the argparse module. However,
# argparse is available as a separate package there.
%if 0%{?centos_version} == 600
Requires:       python-argparse
%endif

%description
Tools to generate block map (AKA bmap) and flash images using bmap. Bmaptool is
a generic tool for creating the block map (bmap) for a file, and copying files
using the block map. The idea is that large file containing unused blocks, like
raw system image files, can be copied or flashed a lot faster with bmaptool
than with traditional tools like "dd" or "cp". See
source.tizen.org/documentation/reference/bmaptool for more information.

%prep
%setup -q

%build

%install
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}

mkdir -p %{buildroot}/%{_mandir}/man1
install -m644 docs/man1/bmaptool.1 %{buildroot}/%{_mandir}/man1

%files
%license COPYING
%dir %{_prefix}/lib/python*/site-packages/bmaptools
%{_prefix}/lib/python*/site-packages/bmap_tools*
%{_prefix}/lib/python*/site-packages/bmaptools/*
%{_bindir}/*

%doc docs/RELEASE_NOTES
%{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by