# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Carl Flippin <carlf@photocarl.org>

pkgbase=libdbi
pkgname=(libdbi libdbi-docs)
pkgver=0.9.0
pkgrel=6
pkgdesc="Database independant abstraction layer for C"
url="http://libdbi.sourceforge.net/"
license=('LGPL')
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
depends=('glibc')
options=(!emptydirs)
source=("https://downloads.sourceforge.net/$pkgbase/$pkgbase-$pkgver.tar.gz")
sha256sums=('dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503')

build() {
  cd $pkgbase-$pkgver
  ./configure --prefix=/usr --build=${CHOST}
  make
}

package_libdbi() {
  cd $pkgbase-$pkgver
  make DESTDIR="$pkgdir" install
  make -C doc DESTDIR="$pkgdir" uninstall
}

package_libdbi-docs() {
  pkgdesc="Developer documentation for libdbi"
  depends=()

  cd $pkgbase-$pkgver
  make -C doc DESTDIR="$pkgdir" install
}
