# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Kyle Keen <keenerd@gmail.com>
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Vladimir Kirillov <proger@wilab.org.ua>

pkgname=libpgm
pkgver=5.3.128
pkgrel=3.1
pkgdesc='Library implementing the Pragmatic General Multicast (PGM, RFC3208) reliable transport protocol (OpenPGM)'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/steve-o/openpgm'
license=('LGPL')
depends=('glibc')
makedepends=('python')
source=("https://github.com/steve-o/openpgm/archive/release-${pkgver//./-}/openpgm-$pkgver.tar.gz")
sha256sums=('8d707ef8dda45f4a7bc91016d7f2fed6a418637185d76c7ab30b306499c6d393')

prepare() {
  cd openpgm-release-${pkgver//./-}/openpgm/pgm

  # https://github.com/steve-o/openpgm/pull/66
  mv openpgm-5.2.pc.in openpgm-5.3.pc.in

  ./bootstrap.sh
}

build() {
  cd openpgm-release-${pkgver//./-}/openpgm/pgm
  ./configure --prefix=/usr
  make
}

package() {
  cd openpgm-release-${pkgver//./-}/openpgm/pgm
  make DESTDIR="$pkgdir" install
}
