# Maintainer: Daniel M. Capella <polyzen@archlinux.org>

pkgname=termdown
pkgver=1.17.0
pkgrel=4
pkgdesc='Countdown timer and stopwatch in your terminal'
arch=('any')
url=https://github.com/trehn/termdown
license=('GPL3')
depends=('python-click' 'python-dateutil' 'python-pyfiglet')
makedepends=('python-setuptools')
optdepends=('espeak-ng: for spoken countdown')
source=("https://files.pythonhosted.org/packages/source/t/termdown/termdown-$pkgver.tar.gz"
        'termdown-espeak-ng.patch::https://github.com/trehn/termdown/commit/2e3fe87ede413dc9378e5bc2e3b16589dfe99a2f.patch')
sha256sums=('0ad7b7ec41b0a112ef3aa1fd429bace570fb838c10a079cc2198b9aa22c6d521'
            'a6ca9c281794bb5bc4f4c00325e50dbfa270b64aebb995a1dfc207acb17c08d8')
b2sums=('e8576a2706fb0b958c57789f32f3e9d962596d4c78c3c7ef1683dac8e8d0c7af1e7e738b58dfd5b127b43fb5dd40ef9d1b68c3e4dd0d2468a04bbdfbd89dcc8e'
        '8de6966b09dac8ad98e8ee610ac3c5ed950dedf65465c38cc5c869a32af55c055329ee3ea8aaeecc738e2b1fd3c58987a44882e6978d2a720d980f6811478b43')

prepare() {
  cd termdown-$pkgver
  patch --forward --strip=1 --input=../termdown-espeak-ng.patch
}

build() {
  cd termdown-$pkgver
  python setup.py build
}

package() {
  cd termdown-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

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