# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>

pkgname=neon
pkgver=0.32.4
pkgrel=2
pkgdesc="HTTP and WebDAV client library with a C interface"
arch=('x86_64')
url="https://notroj.github.io/neon/"
license=('GPL' 'LGPL')
depends=('krb5' 'expat' 'ca-certificates' 'zlib')
makedepends=('xmlto' 'docbook-xsl')
options=('libtool') # FS#16067
source=(https://notroj.github.io/neon/$pkgname-$pkgver.tar.gz)
sha512sums=('82bcd1555f047d26cc5ccd67d2fef8dea4eb5a4cc45ca8030d2f3c356eee03fd78efd7ef45f516948e89f1089686731046b3fe48e73b3d84c65848ef6d86bd7a')
validpgpkeys=('190555472DCC589BEF01609C608A86DF9833CC49') # Joe Orton

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --with-expat \
    --enable-shared \
    --disable-static \
    --with-ssl=openssl \
    --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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