# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=fsarchiver
pkgver=0.8.4
pkgrel=0
pkgdesc="Safe and flexible file-system backup and deployment tool"
arch="all"
url="http://www.fsarchiver.org/"
license="GPL-2.0-only"
subpackages="$pkgname-doc"
makedepends="linux-headers attr-dev bzip2-dev e2fsprogs-dev lz4-dev lzo-dev xz-dev libgcrypt-dev zlib-dev"
source="https://github.com/fdupoux/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-zstd
	make
}

check() {
	cd "$builddir"
	./src/fsarchiver --help > /dev/null
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="15712e5fdb9695148e8fe42791952acf0c7d34611c3467a0cb2e2631c9c5f1c55a4e839098085e6a72c2d8988b05e6f515ef772bcc5766b57a07da65a5209efd  fsarchiver-0.8.4.tar.gz"
