# Maintainer: Sébastien Luttringer
# Contributor: Peter Richard Lewis <plewis@aur.archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org>

pkgname=quilt
pkgver=0.66
pkgrel=2
pkgdesc='Manage a series of patches by keeping track of the changes each patch makes'
arch=('any')
url='https://savannah.nongnu.org/projects/quilt/'
license=('GPL2')
depends=(
  'bash'
  'bzip2'
  'diffstat'
  'diffutils'
  'findutils'
  'gawk'
  'gettext'
  'gzip'
  'patch'
  'perl'
)
checkdepends=('ed')
validpgpkeys=('90DFD6523C57373D81F63D19865688D038F02FC8') # Jean Delvare
source=("https://savannah.nongnu.org/download/quilt/$pkgname-$pkgver.tar.gz"{,.sig})
md5sums=('6800c2404a2c0598ab2eff92a636ba70'
         'SKIP')

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr --sysconfdir=/etc --without-rpmbuild
  make
}

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

package() {
  cd "$pkgname-$pkgver"
  make BUILD_ROOT="$pkgdir" install
  # move bash completion in right place
  install -d -m 755 "$pkgdir/usr/share/bash-completion"
  mv "$pkgdir/etc/bash_completion.d" "$pkgdir/usr/share/bash-completion/completions"
}

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