1 %define githash a50575b
3 Summary: Enable bcache or LVM on existing block devices
6 Release: 0.%{githash}.%{rel}
8 Group: Applications/System
9 Source0: https://github.com/g2p/blocks/archive/%{githash}/%{name}-%{version}-%{githash}.tar.gz
10 # Source0-md5: 06d0033af5a3d4f138698cccf0fa4a6b
11 Patch0: egg-deps.patch
12 URL: https://github.com/g2p/blocks
13 BuildRequires: python3-distribute
14 BuildRequires: python3-modules
15 BuildRequires: rpm-pythonprov
16 BuildRequires: rpmbuild(macros) >= 1.219
17 Requires: python3-augeas >= 0.4.1-2
18 Requires: python3-distribute
19 Requires: python3-parted >= 3.10
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Conversion tools for block devices.
27 Convert between raw partitions, logical volumes, and bcache devices
28 without moving data. blocks shuffles blocks and sprouts superblocks.
36 %{__python3} setup.py build
39 rm -rf $RPM_BUILD_ROOT
40 %{__python3} setup.py install \
43 --root=$RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT%{_sbindir}
46 # admin tool. move to sbin
47 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/blocks
50 rm -rf $RPM_BUILD_ROOT
53 %defattr(644,root,root,755)
55 %attr(755,root,root) %{_sbindir}/blocks
56 %dir %{py3_sitescriptdir}/blocks
57 %{py3_sitescriptdir}/blocks/*.py
58 %{py3_sitescriptdir}/blocks/augeas
59 %{py3_sitescriptdir}/blocks/maintboot.init
60 %{py3_sitescriptdir}/blocks/__pycache__
61 %{py3_sitescriptdir}/blocks-%{version}-py*.egg-info