# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Bächler <thomas@archlinux.org>

pkgname=libnl
pkgver=3.7.0
pkgrel=1
pkgdesc='Library for applications dealing with netlink sockets'
arch=('x86_64')
url='https://github.com/thom311/libnl/'
license=('GPL')
depends=('glibc')
options=('debug')
backup=('etc/libnl/classid'
        'etc/libnl/pktloc')
validpgpkeys=('49EA7C670E0850E7419514F629C2366E4DFC5728') # Thomas Haller
source=("https://github.com/thom311/libnl/releases/download/libnl${pkgver//./_}/${pkgname}-${pkgver}.tar.gz"{,.sig})
sha256sums=('9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939'
            'SKIP')

build() {
  cd $pkgname-$pkgver
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --sbindir=/usr/bin \
    --disable-static
  make
}

check() {
  make -C $pkgname-$pkgver check
}

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