forked from FemboyOS/fempkg_recipes
38 lines
1.8 KiB
Python
38 lines
1.8 KiB
Python
pkgname = "eza"
|
|
pkgver = "0.23.4"
|
|
source = f"https://github.com/eza-community/eza/archive/refs/tags/v{pkgver}.tar.gz"
|
|
builddir = f"/tmp/fempkg/build/{pkgname}/{pkgname}-{pkgver}"
|
|
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
|
|
outputdir = "/home/gabry/lfs-repo/binpkg"
|
|
manifestdir = "/home/gabry/lfs-repo/manifests"
|
|
destdir = f"{fembuilddir}/DESTDIR"
|
|
|
|
deps = ["cmake"]
|
|
|
|
build = [
|
|
# Extract
|
|
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/v{pkgver}.tar.gz",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && cargo build --release",
|
|
f"cd {builddir} && install -d -m 755 {destdir}/usr/bin",
|
|
f"cd {builddir} && install -d -m 755 {destdir}/usr/share/bash-completion/completions/",
|
|
f"cd {builddir} && install -d -m 755 {destdir}/usr/share/fish/vendor_completions.d/",
|
|
f"cd {builddir} && install -d -m 755 {destdir}/usr/share/zsh/site-functions/",
|
|
|
|
f"cd {builddir} && install -Dm755 target/release/eza {destdir}/usr/bin/eza && install -Dm644 completions/fish/eza.fish "
|
|
f"{destdir}/usr/share/fish/vendor_completions.d/eza.fish && install -Dm644 completions/zsh/_eza {destdir}/usr/share/zsh/site-functions/_eza && "
|
|
f"install -Dm644 completions/bash/eza {destdir}/usr/share/bash-completion/completions/eza",
|
|
|
|
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
|
f"install -v -m644 {builddir}/LICENSE.txt {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
|
f"cp -pv {builddir}/LICENSES/* {destdir}/usr/share/licenses/{pkgname}/",
|
|
|
|
# Make tarball + manifests
|
|
f"mkdir -p {outputdir} && cd {destdir} && tar --transform 's|^\\.||' -I zstd -cf {outputdir}/{pkgname}-{pkgver}.tar.zst .",
|
|
f"mkdir -p {manifestdir} && tar -tf {outputdir}/{pkgname}-{pkgver}.tar.zst | grep -v '/$' > {manifestdir}/{pkgname}.txt",
|
|
|
|
# Cleanup
|
|
f"rm -rf {builddir} {fembuilddir}"
|
|
]
|