# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=libasyncns
pkgver=0.8+3+g68cd5af
pkgrel=3
pkgdesc="A C library for executing name service queries asynchronously"
arch=(x86_64)
url="http://0pointer.de/lennart/projects/libasyncns"
license=(LGPL)
depends=(glibc)
makedepends=(git lynx)
_commit=68cd5aff1467638c086f1bedcc750e34917168e4
source=("git://git.0pointer.de/libasyncns.git#commit=$_commit")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./bootstrap.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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