Name:          bup
Version:       0.33.7
Release:       1%{?dist}
Summary:       It backs things up
License:       LGPL-2.0-only AND BSD-3-Clause
URL:           https://github.com/%{name}/%{name}
Source:        https://github.com/%{name}/%{name}/archive/refs/tags/%{version}.tar.gz
BuildRequires: make, gcc, git-core >= 1.5.6, pandoc, sed, perl-Time-HiRes
BuildRequires: python3-devel, python3-tornado,  python3-pyxattr, python3-distlib
BuildRequires: libacl-devel, readline-devel
# Tests
BuildRequires: python3-devel, python3-pytest, python-libfuse, python3-pytest-xdist, pylint, attr, acl, kmod, rsync, man-db, par2cmdline

Requires:      python3 >= 3.7, git-core >= 1.5.6, python-libfuse, par2cmdline, python3-pylibacl, python3-pyxattr, python3-tornado

%description
bup is a program that backs things up. It's short for "backup".

%prep
%autosetup -p1 -n %{name}-%{version}

%build
%make_build

%install
%make_install PREFIX=%{_prefix}

%check
# test-meta fails inside the chroot
rm -v test/ext/test-meta
# these tests show non-deterministic behavior. Assumming there is a data race involved and skipping them.
rm -v test/int/test_git.py
rm -v test/ext/test_get.py
make %{?_smp_mflags} long-check


%files
%license LICENSE
%doc README.md
%doc %{_datadir}/doc/%{name}/%{name}*.html
%{_bindir}/%{name}
%{_prefix}/lib/%{name}/
%{_mandir}/man1/%{name}*.1*
%{_mandir}/man5/%{name}*.5*

%changelog
* Mon Jan 13 2025 Fotios Valasiadis <fvalasiad@proton.me> - 0.33.7-1
- Update package to 0.33.7
* Tue Dec 31 2024 Fotios Valasiadis <fvalasiad@proton.me> - 0.33.6-1
- Update package to 0.33.6
* Sat Nov 2 2024 Fotios Valasiadis <fvalasiad@proton.me> - 0.33.4-1
- Initial RPM package for bup version 0.33.4