# $Id: PKGBUILD 211807 2014-04-27 09:52:28Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: kusakata <shohei atmark kusakata period com>

pkgname=mdds
pkgver=0.10.3
pkgrel=1
pkgdesc="A collection of multi-dimensional data structures and indexing algorithms"
arch=('any')
url="http://code.google.com/p/multidimalgorithm/"
license=('MIT')
checkdepends=('boost')
# see http://code.google.com/p/multidimalgorithm/wiki/Downloads
source=(http://kohei.us/files/mdds/src/${pkgname}_${pkgver}.tar.bz2)
sha1sums=('0c4fa77918b8cc8ad32460c8d8a679e065976dbe')

build() {
  cd ${pkgname}_${pkgver}

  # this is only used in tests
  sed -i -e '/^CPPFLAGS_NODEBUG=/s/=.*/="${CXXFLAGS}"/' configure

  ./configure --prefix=/usr
  # make
}

check() {
  cd ${pkgname}_${pkgver}
  make check
}

package() {
  cd ${pkgname}_${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
