# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=fsarchiver
pkgver=0.8.5
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="bf427dfcc5a73fc799710766dc1c1392ed379565ec68d7cef49e9391da749e08fb655f2b86b4ab4db7cacaf323286b4673a7c3fbebba81ac50d0b66c1f0b91ff  fsarchiver-0.8.5.tar.gz"
