# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>

pkgname=fsarchiver
pkgver=0.8.3
pkgrel=0
pkgdesc="Safe and flexible file-system backup and deployment tool"
arch="all"
url="http://www.fsarchiver.org/"
license="GPL-2.0"
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/fsarchiver/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install
}

sha512sums="a57e64b655e8f44feb9809a4a62207c7d9b63b4c6803d11807cb445f516823d8a97d49963f0eb0c8299a8c5c4538ecd6eb90a7ac0befe1b96f50012ae740b84a  fsarchiver-0.8.3.tar.gz"
