## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pkgname bees %global _version 0.11 %global commit0 cddce845429766561b3eafecdd62ce67cebaa981 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global bumpver 1 Name: %{pkgname} Version: %{_version}%{?bumpver:^%{bumpver}.git%{shortcommit0}} Release: %autorelease Summary: Best-Effort Extent-Same, a btrfs dedupe agent License: GPL-3.0-only AND MIT AND Zlib URL: https://github.com/Zygo/bees Source: %{url}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz # https://github.com/Zygo/bees/pull/286 Patch0: 286.patch # https://github.com/Zygo/bees/pull/309 => merged # Patch1: 309.patch BuildRequires: make BuildRequires: gcc-c++ BuildRequires: btrfs-progs-devel BuildRequires: systemd-rpm-macros %description bees is a block-oriented userspace deduplication agent designed for large btrfs filesystems. It is an offline dedupe combined with an incremental data scan capability to minimize time data spends on disk from write to dedupe. %prep %autosetup -p1 -n %{name}-%{commit0} %conf cat < localconf BEES_VERSION=v%{version} DEFAULT_MAKE_TARGET=all LIBEXEC_PREFIX=%{_libexecdir}/%{name} LIB_PREFIX=%{_libdir} PREFIX=%{_prefix} BINDIR=bin SYSTEMD_SYSTEM_UNIT_DIR=%{_unitdir} EOF %build %make_build %install %make_install %post %systemd_post 'beesd@*.service' %preun %systemd_preun 'beesd@*.service' %postun %systemd_postun_with_restart 'beesd@*.service' %check make test %files %license COPYING %doc README.md %doc docs/*.md docs/*.html %{_bindir}/beesd %{_libexecdir}/%{name} %{_unitdir}/beesd@.service %{_sysconfdir}/%{name}/ %config %{_sysconfdir}/%{name}/beesd.conf.sample %changelog %autochangelog