#!/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"
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=npth
pkgver=1.6
pkgrel=03
pkgdesc='The new GNU portable threads library'
arch=('x86_64')
url="https://www.gnupg.org/software/npth/index.html"
depends=('glibc' 'sh')
makedepends=(automake autoconf)
provides=('libnpth.so')
source=("https://gnupg.org/ftp/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2"{,.sig})

prepare() {
  cd "${pkgname}-${pkgver}"
  autoreconf -fiv
}

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr
  make
}

check() {
  cd "${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -vDm 644 {README,NEWS,ChangeLog} \
    -t "${pkgdir}/usr/share/doc/${pkgname}"
}

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

license=('LGPL2.1')

validpgpkeys=(
  'D8692123C4065DEA5E0F3AB5249B39D24F25E3B6'  # Werner Koch (dist sig)
  '46CC730865BB5C78EBABADCF04376F3EE0856959'  # David Shaw (GnuPG Release Signing Key)
  '031EC2536E580D8EA286A9F22071B08A33BD3F06'  # NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org>
  'D238EA65D64C67ED4C3073F28A861B1C7EFD60D9'  # Werner Koch (Release Signing Key)
)

sha256sums=(1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1  # npth-1.6.tar.bz2
	4bdee04570eec44aba0386936502aadee922e2faaef89d7669a0f124b5dd9fd3) # npth-1.6.tar.bz2.sig
