#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer	: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=expat
pkgver=2.5.0
pkgrel=01
pkgdesc='An XML parser library'
arch=('x86_64')
url="https://libexpat.github.io/"
depends=(glibc filesystem)
makedepends=(cmake )
provides=(libexpat.so)
# options=(debug) # uncomment if you want developers' debug pkg created
source=(https://github.com/libexpat/libexpat/releases/download/R_${pkgver//./_}/$pkgname-$pkgver.tar.bz2{,.asc})

build() {
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None \
        -W no-dev \
        -B build \
        -S $pkgname-$pkgver
  make VERBOSE=1 -C build
}

check() {
  make VERBOSE=1 -C build test
}

package() {
  make VERBOSE=1 DESTDIR="$pkgdir" -C build install
  install -vDm 644 $pkgname-$pkgver/COPYING -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,Changes,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
}

#---- license gpg-key sha256sums ----

license=(MIT)

validpgpkeys=(3176EF7DB2367F1FCA4F306B1F9B0E909AF37285) # Sebastian Pipping

sha256sums=(6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67  # expat-2.5.0.tar.bz2
	9bd7e10b55a5117cf86195e79b349d001292c2760128ce6fc554e2e77d35e55a) # expat-2.5.0.tar.bz2.asc

