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
18 Requires: python3-augeas >= 0.4.1-2
19 Requires: python3-parted >= 3.10
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Conversion tools for block devices.
26 Convert between raw partitions, logical volumes, and bcache devices
27 without moving data. blocks shuffles blocks and sprouts superblocks.
35 %{__python3} setup.py build
38 rm -rf $RPM_BUILD_ROOT
39 %{__python3} setup.py install \
42 --root=$RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT%{_sbindir}
45 # admin tool. move to sbin
46 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/blocks
49 rm -rf $RPM_BUILD_ROOT
52 %defattr(644,root,root,755)
54 %attr(755,root,root) %{_sbindir}/blocks
55 %dir %{py3_sitescriptdir}/blocks
56 %{py3_sitescriptdir}/blocks/*.py
57 %{py3_sitescriptdir}/blocks/augeas
58 %{py3_sitescriptdir}/blocks/maintboot.init
59 %{py3_sitescriptdir}/blocks/__pycache__
60 %{py3_sitescriptdir}/blocks-%{version}-py*.egg-info