# Maintainer: David Macek <david.macek.0@gmail.com>

pkgname=xdelta3
pkgver=3.1.0
pkgrel=1
pkgdesc='Diff utility which works with binary files'
arch=('x86_64' 'i686')
url='http://xdelta.org/'
license=('GPL')
depends=('xz' 'liblzma')
makedepends=('liblzma-devel')
source=("https://github.com/jmacd/${pkgname/3}-gpl/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('114543336ab6cee3764e3c03202701ef79d7e5e8e4863fe64811e4d9e61884dc')

prepare() {
  cd "${pkgname}-${pkgver}"
}

check() {
  cd "${pkgname}-${pkgver}"
  ./$pkgname test
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr --build=${CHOST}
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
