# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>

pkgname=libnsutils
pkgver=0.1.1
pkgrel=1
_netsurf=3.11
pkgdesc='NetSurf Utilities'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://source.netsurf-browser.org/libnsutils.git/'
license=(MIT)
makedepends=(netsurf-buildsystem)
source=("https://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-$_netsurf.tar.gz")
b2sums=('a771d12de754a3cce6a38c79c11388c7d8ec26bda3e30c97eff3542e7b17bbfb3a369e3c99456d954878726a94b8052825ef3801bcd64eab4fabc26091e7b0b8')

build() {
  make -C netsurf-all-$_netsurf/$pkgname COMPONENT_TYPE=lib-shared INCLUDEDIR=include \
    LIBDIR=lib PREFIX=/usr
}

package() {
  cd netsurf-all-$_netsurf/$pkgname
  make COMPONENT_TYPE=lib-shared DESTDIR="$pkgdir" INCLUDEDIR=include LIBDIR=lib \
    PREFIX=/usr install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
