# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>

_pkgname=pgpdump
pkgname=(python-pgpdump python2-pgpdump)
pkgver=1.5
pkgdesc=" a Python library for parsing PGP packets"
url="https://github.com/toofishes/python-pgpdump"
license=('custom:BSD3')

pkgrel=3
arch=(any)
makedepends=('python' 'python2')
source=(https://files.pythonhosted.org/packages/0c/b8/b4a44411077c8f8ac356c8c3e8c95dac154b50f45348c317ebac2a9a85c0/pgpdump-1.5.tar.gz)
sha256sums=('1c4700857bf7ba735b08cfe4101aa3a4f5fd839657af249c17b2697c20829668')

package_python-pgpdump() {
  depends=('python')

  cd "$srcdir/$_pkgname-$pkgver"
  python setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}

package_python2-pgpdump() {
  depends=('python2')

  cd "$srcdir/$_pkgname-$pkgver"
  python2 setup.py install --root="$pkgdir/" --optimize=1
  install -Dm644 COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}
