#!/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=strace
pkgver=6.1
pkgrel=01
pkgdesc='A diagnostic, debugging and instructional userspace tracer'
arch=(x86_64)
url='https://strace.io/'
depends=(perl libunwind)
source=(https://github.com/strace/strace/releases/download/v$pkgver/strace-$pkgver.tar.xz{,.asc})

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --with-libunwind --enable-mpers=no
  make
}

check() {
  # tests do not work in chroot environment. TODO: fixit.
  # make -C $pkgname-$pkgver check
  true
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

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

license=(BSD)

validpgpkeys=('296D6F29A020808E8717A8842DB5BD89A340AEB7') # Dmitry V. Levin <ldv@altlinux.org>

sha256sums=(2579e9cec37dbb786f6ea0bebd15f40dd561ef2bde2a2a2ecdce5963b01859fd  # strace-6.1.tar.xz
	5e554917fba0c574aab96db7206580878d901063cac021bfcbd2fe9c8bce7182) # strace-6.1.tar.xz.asc


