# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Marcin Wieczorek <marcin@marcin.co>
# Contributor: ovi chis <ovi@ovios.org>

pkgname=libqb
pkgver=1.0.3
pkgrel=2
pkgdesc='Library for providing high performance, reusable features for client-server architecture'
url='https://github.com/ClusterLabs/libqb'
arch=('x86_64')
license=('LGPL2.1')
depends=('glibc')
makedepends=('doxygen' 'splint')
checkdepends=('check')
provides=('libqb.so')
source=(https://github.com/ClusterLabs/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz{,.asc})
sha512sums=('3f97fae57f526dea06530f8facb4bcb45b20a961f95ce75b4039d2978dd65288d8c14eb8d619617a89d0202fc7214157562adae06e8b7911264f2a2210b413e9'
            'SKIP')
validpgpkeys=('EA78541A2D92451106C8A1F7B67157F3A70D4537') # Christine Caulfield (Chrissie at work) <ccaulfie@redhat.com>

prepare() {
  cd ${pkgname}-${pkgver}
  ./autogen.sh
}

check() {
  cd ${pkgname}-${pkgver}
  make -C tests VERBOSE=1 check
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --disable-fatal-warnings \
    --disable-static \
    --libdir=/usr/lib \
    --sbindir=/usr/bin
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
