pkgname=inih
pkgver=62
pkgdesc="inih (INI not invented here) simple .INI file parser"
homepage="https://github.com/benhoyt/inih"
license=("BSD")
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/benhoyt/inih/archive/r${pkgver}.tar.gz")
sha512sums=("206ddfaa55d29396c3a44f8d1dfcf578c5ebf892e81fe875cd6b4ec2af5cccf400ca13fc6585b6d8232bd122bd8aef7522bfc83898b5609b29c20bad9390ee02")

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

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    --wrap-mode=nodownload
    -D python.bytecompile=1
    -D default_library=shared
    -D distro_install=true
    -D with_INIReader=true
    -D tests=false
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

src_install() {
  meson install -C build --destdir "$pkgdir"
}

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