# Contributor:
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=uriparser
pkgver=0.8.5
pkgrel=0
pkgdesc="A strictly RFC 3986 compliant URI parsing and handling library"
url="https://uriparser.github.io/"
arch="all"
license="BSD"
depends=""
makedepends=""
# libcpptest is missing to run tests
options="!check"
subpackages="$pkgname-dev"
source="https://github.com/uriparser/uriparser/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--disable-test \
		--disable-doc \
		--disable-static || return 1
	make || return 1
}

check() {
	cd "builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="e9b0228092cf12b824975000b0a6dbe2e413d3642203666d77c5b42f04bc13e0ec3f61d6a2c44d9613bea15e8cf7ec42cc4c92c5bc4318ee3349c1b380409d5c  uriparser-0.8.5.tar.bz2"
