#!/bin/sh

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

#ebs.formulae
ebsver=1

pkgname=xz
pkgver=5.8.4
pkgsrc=https://github.com/tukaani-project/xz/releases/download/v$pkgver/xz-$pkgver.tar.xz
pkgchecksum=sha256:4ce24038fd4221e0d13bc1a2de7a4db56e90b92b3bf75321f6c14be73f65de4b
pkgdesc="C89 implementation of the .xz file format"
pkgmaintainer="juanvel400 <me@juanvel400.com>"
pkglicense="GPL-2.0-or-later"
pkghomepage="https://tukaani.org/xz"
pkgcheck=true
pkgdeps="musl"
pkgprovides="liblzma"

build() {
    ./configure ${CONFIGUREFLAGS:-} --prefix=/usr --enable-year2038 --disable-rpath --disable-static
    make
}

check() {
    make check
}

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