# $Id: PKGBUILD 289310 2018-02-05 22:40:47Z eschwartz $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Francois Boulogne <fboulogne at april dot org>

pkgname=pastebinit
pkgver=1.5
pkgrel=2
pkgdesc="Send anything you want directly to a pastebin from the command line"
arch=('any')
url="https://launchpad.net/pastebinit"
license=("GPL")
depends=("python")
makedepends=("asciidoc")
source=("https://launchpad.net/pastebinit/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"{,.asc})
sha512sums=('47eb785fbea1089ad3dd80ec7f481c553da2599a6fb3c47f0bb0c3c776a79331c63e38d4c0494253571b40c9808dbeeed62d14048e328d8562ca536bd0815986'
            'SKIP')
validpgpkeys=('602F567663E593BCBD14F338C638974D64792D67') # Stéphane Graber <stgraber@stgraber.org>

build() {
  cd ${pkgname}-${pkgver}
  a2x -f manpage pastebinit.xml
  make -C po
}

package() {
  cd ${pkgname}-${pkgver}
  install -d "$pkgdir"/usr/{bin,share/man/man1,share/locale}
  install -m 755 pastebinit "$pkgdir"/usr/bin
  install -m 644 pastebinit.1 "$pkgdir"/usr/share/man/man1
  cp -a pastebin.d "$pkgdir"/usr/share
  cp -a po/mo/* "$pkgdir"/usr/share/locale
}
