#!/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=bc
pkgver=1.07.1
pkgrel=04
pkgdesc="An arbitrary precision calculator language"
arch=('x86_64')
url="https://www.gnu.org/software/bc/"
depends=('readline')
makedepends=('ed')
replaces=('bc-readline')
conflicts=('bc-readline')
source=(https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.sig})

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr --mandir=/usr/share/man \
    --infodir=/usr/share/info --with-readline
  make -j1
}

check () {
  cd "${pkgname}-${pkgver}"
  echo "quit" | ./bc/bc -l Test/checklib.b
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}

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

license=('GPL')

validpgpkeys=('00E426232F384BF6D32D8B1881C24FF12FB7B14B') # Phil Nelson <philnelson@acm.org>

sha256sums=(62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a # bc-1.07.1.tar.gz
	1746ec25209f1b3f6b680390c6f563002f1d4eb1435f93d2206eaaffaa8e6c02) # bc-1.07.1.tar.gz.sig
