# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>

pkgname=libslirp
pkgver=4.8.0
pkgrel=1
pkgdesc='General purpose TCP-IP emulator'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://gitlab.freedesktop.org/slirp/libslirp'
license=(BSD MIT)
depends=(glib2)
makedepends=(meson)
provides=('libslirp.so')
source=("${url}/-/archive/v${pkgver}/libslirp-v${pkgver}.tar.gz")
sha512sums=('eef9d77f1588c4e3dcf91cd53e54db235d624998fc64df75d389657411635f28bfcbe0c81cd3b0ede7792eea1eb7ef716b8a87a199a6be1e9a29da27ca4a1df4')
b2sums=('2f8b977d5ba7e82d6e3a2e819e6b744d4b16edc2edf327b1af158428b94c4842e0699410834873fdb88095fac591307e73559645e57b002bb78c4b3ffaf3cdf3')

build() {
  arch-meson "$pkgname-v${pkgver}" build
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -vDm 644 "$pkgname-v${pkgver}"/COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
