# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Patryk Kowalczyk <patryk@kowalczyk.ws>
pkgname=libiscsi
pkgver=1.19.0
pkgrel=2
makedepends=('git')
depends=('glibc' 'popt' 'libgcrypt')
pkgdesc="Clientside library to implement the iSCSI protocol"
arch=(x86_64)
url="https://github.com/sahlberg/libiscsi"
license=('LGPL')
source=(libiscsi::git+https://github.com/sahlberg/libiscsi.git#tag=${pkgver})
sha512sums=('SKIP')

build() {
  cd "${srcdir}/${pkgname}"
  ./autogen.sh

  # Disabled werror due to GCC 8 warnings: https://github.com/sahlberg/libiscsi/issues/266
  ./configure --prefix=/usr --disable-static --libdir=/usr/lib --disable-werror 
  make
}

check() {
  cd "${srcdir}/${pkgname}"
  make check
}

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