#!/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"
# Website		: https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=sed
pkgver=4.9
pkgrel=03
pkgdesc='GNU stream editor'
url='https://www.gnu.org/software/sed/'
groups=('jobbot')
depends=('glibc' 'acl')
makedepends=('gettext')
source=("https://ftp.gnu.org/pub/gnu/sed/$pkgname-$pkgver.tar.xz"{,.sig})

prepare() {
  cd $pkgname-$pkgver
  # apply patch from the source array (should be a pacman feature)
  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = *.patch ]] || continue
    msg2 "Applying patch $src..."
    patch -Np1 < "../$src"
  done
}

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

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

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

#---- arch license gpg-key & sha256sums ----

arch=('x86_64')

license=('GPL3')

validpgpkeys=('155D3FC500C834486D1EEA677FD9FCCB000BEEEE') #Jim Meyering <jim@meyering.net>

sha256sums=(6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181  # sed-4.9.tar.xz
	9ea64f215b308ae0a80cd958daaac23bb13491d69a472a0195974d107890a8c6) # sed-4.9.tar.xz.sig

##  0818c416758a4efb93a5c544f095b44cdba471f3b592f11c4bd835054fa4fe20  sed-4.9-03-x86_64.pkg.tar.lz


