# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Charles Mauch <cmauch@gmail.com>

pkgname=when
pkgver=1.1.40
pkgrel=3
pkgdesc="A simple commandline personal calendar program"
arch=('any')
url="http://www.lightandmatter.com/when/when.html"
license=('GPL')
depends=('perl')
#makedepends=('git')
#source=("git+https://github.com/bcrowell/when.git#commit=f576dcbfc71cc529f9ad3c191a3754e51088a49c")
source=("$pkgname-$pkgver.tar.gz::https://github.com/bcrowell/when/archive/$pkgver.tar.gz"
        https://github.com/bcrowell/when/commit/7d70096fe93092fd36f991ab88fa609fc5deb302.patch)
sha256sums=('1363d48c32c4bb528514abf012ae0a61e7c686504a047ce870e72e791447c3d1'
            '65f3a668c3c42df9c3543d2e1e52db2f8d7ebeb5df1f933e095f4ee7647a6a09')

prepare() {
  cd $pkgname-$pkgver
  # fix a repro issue in 1.1.40, can be removed with the next release
  patch -p1 < "$srcdir/7d70096fe93092fd36f991ab88fa609fc5deb302.patch"
}

package() {
  cd "$srcdir"/when-$pkgver
  make install DESTDIR="${pkgdir}"
}
