Files
fempkg_recipes/CLI11.recipe.py

30 lines
1.1 KiB
Python

pkgname = "CLI11"
pkgver = "2.6.1"
source = f"https://github.com/CLIUtils/CLI11.git"
builddir = f"/tmp/fempkgbuild/{pkgname}"
source_type = "git"
fembuilddir = builddir
outputdir = "/home/gabry/lfs-repo/binpkg"
manifestdir = "/home/gabry/lfs-repo/manifests"
destdir = f"{fembuilddir}/DESTDIR"
deps = ["git", "cmake"] # well i mean
build = [
# 64-bit build
f"cd {builddir} && git checkout ee326d6 && mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX=/usr -DCLI11_PRECOMPILED=ON ..",
f"cd {builddir}/build && make -j$(nproc)",
f"cd {builddir}/build && make DESTDIR={destdir} install",
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE",
# 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}"
]