# Use development version which includes the license %global commit0 8c9b1112859c3a472055ed1123346b2cf9a512ff %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global date 20170222 Name: btrfs-heatmap Version: 5 Release: 2.%{date}git%{shortcommit0}%{?dist} Summary: Visualize the layout of data on your btrfs filesystem over time License: GPLv2 URL: https://github.com/knorrie/btrfs-heatmap Source0: https://github.com/knorrie/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz BuildArch: noarch Requires: python3-btrfs Suggests: %{name}-doc = %{version}-%{release} %description The btrfs heatmap script creates a visualization of how a btrfs filesystem is utilizing the underlying disk space of the block devices that are added to it. %package doc Summary: Documentation for %{name} %description doc The btrfs heatmap script creates a visualization of how a btrfs filesystem is utilizing the underlying disk space of the block devices that are added to it. This package contains the documentation. %prep %autosetup -n %{name}-%{commit0} # Remove execution bit from doc find doc -type f -print0 | xargs -0 chmod 0644 %build %install install -D -p -m 0755 heatmap.py %{buildroot}%{_bindir}/btrfs-heatmap %files %license COPYING %{_bindir}/btrfs-heatmap %files doc %doc README.md doc %license COPYING %changelog * Mon Feb 20 2017 Juan Orti Alcaine - 5-2.20170222git8c9b111 - Split doc in its own subpackage - Preserve timestamp when installing * Mon Feb 20 2017 Juan Orti Alcaine - 5-1.20170222git8c9b111 - Initial package