pkgname=pugixml
pkgver=1.15
pkgdesc="Light-weight, simple and fast XML parser for C++ with XPath support"
arch=(x86_64)
homepage="https://pugixml.org"
license=(MIT)
depends=(
  gcc-libs
  glibc
)
makedepends=(cmake)
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/zeux/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz")
md5sums=("cb4cb8754f94448a0a2a56ae8324b08e")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  cmake -B build \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_BUILD_TYPE=Release \
    -D BUILD_SHARED_LIBS=ON
  cmake --build build
}

src_install() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}

# vim:ft=sh syn=sh et sw=2:
