# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero
# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el
# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild.
name    = "tree"
version = "2.3.2"
license = "GPL-2.0-or-later"

[source]
tarball = "https://gitlab.com/OldManProgrammer/unix-tree/-/archive/2.3.2/unix-tree-2.3.2.tar.gz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "c22dd6bd6074f521959d31c3c9adbccec5a039029ca818df8345c7572f5b29b4b7b813e9ce4336cc0d600095130a709f7cbf7f88765a7a1e6894b16701d1fcd9"
sha256  = "513a53cbc42ca1f4ea06af2bab1f5283524a3848266b1d162416f8033afc4985"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "static"
flags    = []

[deps]
build = ["make"]

[build.phases]
# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático):
compile = "make LDFLAGS=\"$LDFLAGS\" CFLAGS=\"$CFLAGS\""
# de package() de Alpine (traducido $pkgdir→/out):
install = "make PREFIX=\"/out/usr\" MANDIR=\"/out/usr/share/man\" install"
