# Maintainer: Johannes Löthberg <johannes@kyriasis.com>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=pacman-contrib
pkgver=1.8.0
pkgrel=1
pkgdesc='Contributed scripts and tools for pacman systems'
arch=('x86_64')
url=https://gitlab.archlinux.org/pacman/pacman-contrib
license=('GPL')
depends=('fakeroot' 'pacman' 'perl')
makedepends=('asciidoc')
optdepends=('diffutils: for pacdiff'
            'findutils: for pacdiff --find'
            'mlocate: for pacdiff --locate'
            'sudo: privilege elevation for several scripts'
            'vim: default merge program for pacdiff')
source=("$url/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz")
b2sums=('af3d00b230a53158c63cdb42db82531154da54d8e6bcd1dd056818ef7c5602a998180976e87dad059b376b412f0f059b6fa275dd1200ad64b2596c243ec2dade')
#validpgpkeys=('5134EF9EAF65F95B6BB1608E50FB9B273A9D0BB5'  # Johannes Löthberg <johannes@kyriasis.com>
#              '04DC3FB1445FECA813C27EFAEA4F7B321A906AD9') # Daniel M. Capella <polyzen@archlinux.org>

prepare() {
  cd $pkgname-v$pkgver
  ./autogen.sh
}

build() {
  cd $pkgname-v$pkgver
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var
  make
}

check() {
  cd $pkgname-v$pkgver
  make check
}

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

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