#!/bin/sh

#shellcheck disable=SC2034
#shellcheck disable=SC2154
#shellcheck disable=SC2086

#ebs.formulae
ebsver=1

pkgname=patch
pkgver=2.8
pkgsrc=https://ftp.gnu.org/gnu/patch/patch-$pkgver.tar.xz
pkgchecksum=sha256:f87cee69eec2b4fcbf60a396b030ad6aa3415f192aa5f7ee84cad5e11f7f5ae3
pkgdesc="applies textual changes to files"
pkgmaintainer="juanvel400 <me@juanvel400.com>"
pkglicense="GPL-3.0-or-later"
pkghomepage="https://www.gnu.org/software/patch"
pkgcheck=true
pkgdeps="musl"

build() {
    ./configure ${CONFIGUREFLAGS:-} --prefix=/usr
    make
}

check() {
    make check
}

package() {
    "${1:-fakeroot}" make install DESTDIR="$pkgdir"
}
