# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=openpgm
pkgver=5.3.128
pkgrel=0
pkgdesc="Implementation of the PGM reliable multicast protocol"
url="https://www.freshports.org/net/openpgm/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	autoconf
	automake
	libtool
	perl
	python3
	"
subpackages="$pkgname-dev"
source="https://github.com/steve-o/openpgm/archive/refs/tags/release-${pkgver//./-}.tar.gz"
builddir="$srcdir/openpgm-release-${pkgver//./-}/openpgm/pgm"
options="!check" # no tests

prepare() {
	default_prepare
	mv openpgm-5.2.pc.in openpgm-5.3.pc.in
	./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
ad1148cb01d982be48ca35c027938e60fc86f2da3de14e994c3d390a6c5b13385893f2bd87d23c2d6cbd9015770ff72ef6fb1090b6ccf3bfd0812189e67fd3bd  release-5-3-128.tar.gz
"
