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

pkgname=pth
pkgver=2.0.7
pkgrel=08
pkgdesc="The GNU Portable Threads."
arch=('x86_64')
url="https://www.gnu.org/software/pth/"
depends=('glibc' 'awk')
options=('!makeflags')
source=(https://ftp.gnu.org/gnu/pth/$pkgname-$pkgver.tar.gz{,.sig})

build() {
  cd "$pkgname-$pkgver"

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --localstatedir=/var \
              --mandir=/usr/share/man \
              --disable-static \
              --enable-shared \
              --with-pic

  sed -i "s|awk=''|awk=/bin/awk|g" shtool # "Cannot find a reasonable Awk"

  make
}

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

  make check
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="${pkgdir}" install
}

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

license=('LGPL')

validpgpkeys=('4E23E878D41A0A88EDFCFA5A6E744ACBA9C09E30')  # Ralf Engelschall

sha256sums=(72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232 # pth-2.0.7.tar.gz
	e2e18f775fc916ebb134a3254d518b158b1c84604759fbc6e1c38d530e813604) #  pth-2.0.7.tar.gz.sig
 
 
