# Contributor: Aurelien Foret <orelien@chez.com>
# Maintainer: Douglas Soares de Andrade <douglas@archlinux.org>

pkgname=patchutils
pkgver=0.4.2
pkgrel=2.1
pkgdesc="A small collection of programs that operate on patch files"
license=('GPL')
url="http://cyberelk.net/tim/patchutils/"
ncxfab_makedepends=('base-devel' 'python3' 'sh' 'coreutils' 'crosspacman' 'make')
ncxfat_makedepends=('binutils' 'pcre2' 'xmlto' 'gcc')
source=("http://cyberelk.net/tim/data/patchutils/stable/patchutils-$pkgver.tar.xz"{,.sig})
sha256sums=('8875b0965fe33de62b890f6cd793be7fafe41a4e552edbf641f1fed5ebbf45ed'
            'SKIP')
validpgpkeys=('4629AFE960EC20BEC12E3104B7C20D079491EA63') # Tim Waugh <tim@cyberelk.net>

build() {
  cd "${srcdir}"/patchutils-${pkgver}

  ./configure --prefix=$MPKG_USRPATH --host=$MPKG_TARGETMACHINE
  make
}

package() {
  ncxfah_depends=('python3')
  ncxfat_depends=('pcre2')
  cd "${srcdir}"/patchutils-${pkgver}

  make DESTDIR="${pkgdir}" install
}
