Files
fempkg_recipes/hyprpicker.recipe.py

30 lines
1.0 KiB
Python

pkgname = "hyprpicker"
pkgver = "0.4.5"
source = f"https://github.com/hyprwm/hyprpicker.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 = []
build = [
# 64-bit build
f"cd {builddir} && mkdir -v build && cd build && cmake -D CMAKE_INSTALL_PREFIX=/usr .. -G Ninja",
f"cd {builddir}/build && ninja",
f"cd {builddir}/build && DESTDIR={destdir} ninja 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}"
]