forked from FemboyOS/fempkg_recipes
34 lines
1.5 KiB
Python
34 lines
1.5 KiB
Python
pkgname = "librewolf"
|
|
pkgver = "146.0-2"
|
|
source = f"https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/{pkgver}/librewolf-{pkgver}.source.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 = [] # hello
|
|
|
|
build = [
|
|
# Extract
|
|
f"mkdir -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.source.tar.gz",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && echo \"ac_add_options --prefix=/usr\" >> mozconfig",
|
|
f"cd {builddir} && ./mach build",
|
|
f"cd {builddir} && DESTDIR={destdir} ./mach install",
|
|
|
|
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
|
f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
|
f"install -v -m644 {builddir}/toolkit/content/license.html {destdir}/usr/share/licenses/{pkgname}/license.html",
|
|
f"mkdir -p {destdir}/usr/share/applications && wget https://aur.archlinux.org/cgit/aur.git/plain/librewolf.desktop?h=librewolf -O "
|
|
f"{destdir}/usr/share/applications/librewolf.desktop",
|
|
|
|
# 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 {fembuilddir}"
|
|
]
|