# Maintainer: Daniel M. Capella # Contributor: Kr1ss $(echo \|sed s/\+/./g\;s/\-/@/) # Contributor: Alexander Görtz # Contributor: Dan Beste # Contributor: Julien Nicoulaud # Contributor: stef204 pkgname=borgmatic pkgver=1.7.13 pkgrel=1 pkgdesc='Simple, configuration-driven backup software for servers and workstations' arch=('any') url=https://torsion.org/borgmatic license=('GPL3') depends=('borg' 'python-colorama' 'python-jsonschema' 'python-requests' 'python-ruamel-yaml' 'python-setuptools') makedepends=('python-build' 'python-installer' 'python-wheel') checkdepends=('python-flexmock' 'python-pytest') optdepends=('python-llfuse: for mount action') source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz") sha256sums=('af7a6a2f0ae1d9866761bc02aaecc34168d3f059046671f2e157f0ee2985e4b8') b2sums=('c20b384853c0ddf52a095250a05d9ebe813a23ee6ef00bd5748dacf05adcff9e4d324eb2e785ebbf139d34cadab3e58d3b8305d50ec5ff20681630040433e5ae') prepare() { cd $pkgname-$pkgver sed -i 's,root/.local,usr,' sample/systemd/$pkgname.service } build() { cd $pkgname-$pkgver python -m build --wheel --skip-dependency-check --no-isolation } check() { cd $pkgname-$pkgver python -m venv --system-site-packages test-env test-env/bin/python -m installer dist/*.whl PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest -c /dev/null \ --ignore=tests/end-to-end } package() { cd $pkgname-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl install -Dm644 -t "$pkgdir"/usr/lib/systemd/system sample/systemd/* install -d "$pkgdir"/usr/share/{bash-completion/completions,fish/vendor_completions.d} ./test-env/bin/borgmatic --bash-completion > \ "$pkgdir"/usr/share/bash-completion/completions/$pkgname ./test-env/bin/borgmatic --fish-completion > \ "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish }