]> git.pld-linux.org Git - packages/blocks.git/blob - blocks.spec
suggests maintboot
[packages/blocks.git] / blocks.spec
1 %define githash a50575b
2 %define rel             1
3 Summary:        Enable bcache or LVM on existing block devices
4 Name:           blocks
5 Version:        0.1.4
6 Release:        0.%{githash}.%{rel}
7 License:        GPL v3
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
20 Suggests:       maintboot
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Conversion tools for block devices.
26
27 Convert between raw partitions, logical volumes, and bcache devices
28 without moving data. blocks shuffles blocks and sprouts superblocks.
29
30 %prep
31 %setup -qc
32 mv blocks-*/* .
33 %patch0 -p1
34
35 %build
36 %{__python3} setup.py build
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 %{__python3} setup.py install \
41         --skip-build \
42         --optimize=2 \
43         --root=$RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT%{_sbindir}
46 # admin tool. move to sbin
47 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/blocks
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 %defattr(644,root,root,755)
54 %doc README.md
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
This page took 0.050783 seconds and 3 git commands to generate.