# $Id: PKGBUILD 144329 2015-10-18 14:48:05Z arodseth $
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: d'Ronin <daronin@2600.com>
# Contributor: Hexchain Tong <richard0053@gmail.com>

pkgname=botan
pkgver=1.11.21
pkgrel=1
pkgdesc='Crypto library written in C++'
license=('BSD')
arch=('x86_64' 'i686')
url='http://botan.randombit.net/'
depends=('gcc-libs' 'sh' 'asio')
makedepends=('python' 'asio' 'git')
source=("http://botan.randombit.net/releases/Botan-${pkgver}.tgz"{,.asc})
#source=("git://github.com/randombit/botan.git#commit=8e19ecf11c")
md5sums=('f8cb3f2d112685550d88434210136a58'
         'SKIP')
# Botan Distribution Key. To import: gpg --import botan.key
validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC')

build() {
  cd "${pkgname^}-$pkgver"

  python configure.py \
    --prefix=/usr \
    --destdir="$pkgdir/usr"
  make
}

check() {
  cd "${pkgname^}-$pkgver"

  ./botan-test
}

package() {
  cd "${pkgname^}-$pkgver"

  make DESTDIR="$pkgdir/usr" install
  find "$pkgdir/usr/share/doc" -type f -exec chmod 0644 {} \;
  install -Dm644 doc/license.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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