Debian Codegraph @

packaging/bmaptool.spec

raw
1 # We follow the Fedora guide for versioning. Fedora recommends to use something
2 # like '1.0-0.rc7' for release candidate rc7 and '1.0-1' for the '1.0' release.
3 %define rc_str %{?rc_num:0.rc%{rc_num}}%{!?rc_num:1}
4
5 Name: bmaptool
6 Summary: Tools to generate block map (AKA bmap) and flash images using bmap
7 Version: 3.9.0
8 %if 0%{?opensuse_bs}
9 Release: %{rc_str}.<CI_CNT>.<B_CNT>
10 %else
11 Release: %{rc_str}.0.0
12 %endif
13
14 Group: Development/Tools/Other
15 License: GPL-2.0
16 BuildArch: noarch
17 URL: https://github.com/yoctoproject/bmaptool
18 Source0: %{name}-%{version}.tar.gz
19
20 Requires: bzip2
21 Requires: pbzip2
22 Requires: gzip
23 Requires: xz
24 Requires: tar
25 Requires: unzip
26 Requires: lzop
27 %if ! 0%{?tizen_version:1}
28 # pigz is not present in Tizen
29 Requires: pigz
30 %endif
31
32 %if 0%{?suse_version}
33 BuildRequires: python-distribute
34 %endif
35 %if 0%{?fedora_version}
36 BuildRequires: python-setuptools
37 %endif
38 BuildRequires: python2-rpm-macros
39
40 %if 0%{?suse_version}
41 # In OpenSuse the xml.etree module is provided by the python-xml package
42 Requires: python-xml
43 # The gpgme python module is in python-gpgme
44 Requires: python-gpgme
45 %endif
46
47 %if 0%{?fedora_version}
48 # In Fedora the xml.etree module is provided by the python-libs package
49 Requires: python-libs
50 # Tha gpgme python module is in pygpgme package
51 Requires: pygpgme
52 %endif
53
54 # Centos6 uses python 2.6, which does not have the argparse module. However,
55 # argparse is available as a separate package there.
56 %if 0%{?centos_version} == 600
57 Requires: python-argparse
58 %endif
59
60 %description
61 Tools to generate block map (AKA bmap) and flash images using bmap. bmaptool is
62 a generic tool for creating the block map (bmap) for a file, and copying files
63 using the block map. The idea is that large file containing unused blocks, like
64 raw system image files, can be copied or flashed a lot faster with bmaptool
65 than with traditional tools like "dd" or "cp". See
66 source.tizen.org/documentation/reference/bmaptool for more information.
67
68 %prep
69 %setup -q -n %{name}-%{version}
70
71 %build
72
73 %install
74 rm -rf %{buildroot}
75 %{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot}
76
77 mkdir -p %{buildroot}/%{_mandir}/man1
78 install -m644 docs/man1/bmaptool.1 %{buildroot}/%{_mandir}/man1
79
80 %files
81 %defattr(-,root,root,-)
82 %license COPYING
83 %dir /usr/lib/python*/site-packages/bmaptool
84 /usr/lib/python*/site-packages/bmap_tools*
85 /usr/lib/python*/site-packages/bmaptool/*
86 %{_bindir}/*
87
88 %doc docs/RELEASE_NOTES
89 %{_mandir}/man1/*