feat: add electron and cups
This commit is contained in:
31
electron.recipe.py
Normal file
31
electron.recipe.py
Normal file
@@ -0,0 +1,31 @@
|
||||
pkgname = "electron"
|
||||
pkgver = "39.2.7"
|
||||
Pkgver = pkgver[:2]
|
||||
source = f"https://github.com/electron/electron/releases/download/v{pkgver}/electron-v{pkgver}-linux-x64.zip"
|
||||
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 = ["NSS", "gtk3", "alsa-lib", "cups"]
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir -p {destdir}/usr/{{lib,bin}} && unzip /var/lib/fempkg/pkgs/{pkgname}-v{pkgver}-linux-x64.zip -d {destdir}/usr/lib/{pkgname}-{Pkgver}",
|
||||
|
||||
# 64-bit build
|
||||
f"chmod 4755 {destdir}/usr/lib/electron-{Pkgver}/chrome-sandbox",
|
||||
f"ln -s /usr/lib/electron-39/electron {destdir}/usr/bin/electron",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {destdir}/usr/lib/electron-{Pkgver}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE",
|
||||
f"install -v -m644 {destdir}/usr/lib/electron-{Pkgver}/LICENSES.chromium.html {destdir}/usr/share/licenses/{pkgname}/LICENSES.chromium.html",
|
||||
|
||||
# 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}"
|
||||
]
|
||||
Reference in New Issue
Block a user