# Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=ldns pkgver=1.6.17 pkgrel=2 pkgdesc="Lowlevel DNS(SEC) library" url="http://nlnetlabs.nl/projects/ldns/" arch="all" license="Custom" depends= depends_dev="openssl-dev" makedepends="$depends_dev perl" install="" subpackages="$pkgname-dev $pkgname-doc drill $pkgname-tools" source="http://nlnetlabs.nl/downloads/ldns/ldns-$pkgver.tar.gz CVE-2014-3209.patch " _builddir="$srcdir"/ldns-$pkgver prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ || return 1 (cd drill && ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr) \ || return 1 (cd examples && ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr) \ || return 1 make || return 1 make -C drill || return 1 make -C examples || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 make -C drill DESTDIR="$pkgdir" install || return 1 make -C examples DESTDIR="$pkgdir" install || return 1 mkdir -p "$pkgdir"/usr/lib/pkgconfig cat > "$pkgdir"/usr/lib/pkgconfig/libldns.pc<