# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xdelta3
pkgver=3.1.0
pkgrel=2
pkgdesc="A diff utility which works with binary files"
url="http://xdelta.org/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-doc"
makedepends="xz-dev"
source="https://github.com/jmacd/xdelta-gpl/releases/download/v$pkgver/xdelta3-$pkgver.tar.gz"

prepare() {
	default_prepare

	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-lzma
	make
}

check() {
	make check
}

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

sha512sums="
848c90a28018ec3c541ec43be59ea90328142c4705d3b59907fd89e8f6ac2758e288b1a1112fea601884c50ef7f6cf2c1634f539a76bea65a2741d3bb0e9b990  xdelta3-3.1.0.tar.gz
"
