# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: João Figueiredo <jf.mundox@gmail.com> (11/07/2020)
# Contributor: freggel.doe (Fixed i18n problem with make test,  13/07/2020)
# Contributor: Christian Rebischke <chris.rebischke@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Jakob Matthes <jakob.matthes@gmail.com>
# Contributor: Bram Schoenmakers <me@bramschoenmakers.nl>
# Contributor: henning mueller <henning@orgizm.net>
# Contributor: rakoo (AUR)
# Contributor: SanskritFritz (gmail)

pkgname=bup
pkgver=0.32
pkgrel=2
pkgdesc='Efficient backup system based on the git packfile format'
arch=(x86_64)
url='https://bup.github.io/'
license=(GPL)
depends=(python-fuse par2cmdline python-pyxattr git)
optdepends=('python-tornado: for bup web')
makedepends=(pandoc)
source=(https://github.com/bup/bup/archive/$pkgver/$pkgname-$pkgver.tar.gz
        bup-readline.patch)
sha256sums=('a894cfa96c44b9ef48003b2c2104dc5fa6361dd2f4d519261a93178984a51259'
            '9c786249699ee5f6580137745045a4030d8b61d85b4e3a3b576f6a91d09b2397')

prepare() {
  patch -d $pkgname-$pkgver -p0 < bup-readline.patch # Fix readline detection
}

build() {
  cd $pkgname-$pkgver
  ./configure
  make
}

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