# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=diffutils
pkgver=3.12
pkgrel=2.2
pkgdesc='Utility programs used for creating patch files'
arch=('x86_64' 'aarch64')
url='https://www.gnu.org/software/diffutils'
license=('GPL-3.0-or-later')
depends=('glibc')
makedepends=('git' 'gperf' 'help2man' 'python' 'wget')
validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') # Jim Meyering
source=("git+https://https.git.savannah.gnu.org/git/diffutils.git#tag=v${pkgver}?signed"
        "git+https://https.git.savannah.gnu.org/git/gnulib.git")
b2sums=('d7e72109db2b1607c2d17253df9232555d0dd3a87a2d1a1f90fac4ecdc4035a538c08078c741eea987eb37b0ab8c772553abddbc986fbeeda186fff7d2ff31da'
        'SKIP')

prepare() {
  cd $pkgname

  git submodule init
  git config submodule.gnulib.url "${srcdir}/gnulib"
  git -c protocol.file.allow=always submodule update

  ./bootstrap
}

build() {
  cd $pkgname

  ./configure \
    --prefix=/usr \
    --disable-gcc-warnings
  make
}

check() {
  cd $pkgname

  make check
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
