# Contributor: Olivier Mauras <olivier@mauras.ch>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=borgbackup
pkgver=1.1.4
pkgrel=0
pkgdesc="Deduplicating backup program"
url="https://borgbackup.readthedocs.io/"
arch="all"
license="BSD-3-Clause"
depends="python3 py3-msgpack py3-zmq"
makedepends="python3-dev lz4-dev acl-dev attr-dev libressl-dev linux-headers"
source="https://github.com/$pkgname/borg/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	python3 setup.py build
}

package() {
	cd "$builddir"
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	# Clean some useless files.
	cd "$pkgdir"/usr/lib/python*/site-packages/borg
	find . -name '*.h' -delete -o -name '*.c' -delete -o -name '*.pyx' -delete
}

sha512sums="0853033f72406a2913dd74c6ebb8b33a318179843255c92481f5e4fdd0f436de6e4c77eed259a422e00bfadcf260facdfd00c813bb0628b82b8ff63a87e1bcfb  borgbackup-1.1.4.tar.gz"
