# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
pkgname=libnatpmp
pkgver=20230423
pkgrel=0
pkgdesc="Portable and fully compliant implementation of the NAT-PMP protocol"
url="http://miniupnp.free.fr/libnatpmp.html"
arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-dev $pkgname-doc"
source="https://miniupnp.tuxfamily.org/files/libnatpmp-$pkgver.tar.gz"
options="!check" # no check provided

build() {
	make
}

package() {
	make INSTALLPREFIX="$pkgdir/usr" INSTALLDIRINC="$pkgdir/usr/include" install
	# Install missing header
	install -Dm644 natpmp_declspec.h -t "$pkgdir"/usr/include
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm644 natpmpc.1 "$pkgdir/usr/share/man/man1/natpmpc.1"
}

sha512sums="
1697a414f0ff73876c177d8e09242c8da6fd4bc9b1c3a893bfb082420bfdac30f455507b81937042caaf6b30756d2055c073ee1de1ac73f7ef31e4c68e5c4ed7  libnatpmp-20230423.tar.gz
"
