30 lines
1.6 KiB
Python
30 lines
1.6 KiB
Python
pkgname = "flatpak"
|
|
pkgver = "1.16.2"
|
|
source = f"https://github.com/flatpak/flatpak/releases/download/{pkgver}/flatpak-{pkgver}.tar.xz"
|
|
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 = ["appstream", "dbus", "fuse", "glib", "gpgme", "json-glib", "elogind", "ostree", "p11-kit", "pyparsing", "libglvnd", "appstream-glib", "avahi", "bubblewrap", "curl", "libarchive", "libseccomp", "libsoup", "libxau", "xdg-dbus-proxy", "xdg-desktop-portal", "libportal"]
|
|
|
|
build = [
|
|
# Extract
|
|
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.xz",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && mkdir build && cd build && meson setup --prefix=/usr --buildtype=release -D systemd=disabled -D system_bubblewrap=bwrap -D system_dbus_proxy=xdg-dbus-proxy -D tests=false ..",
|
|
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}/COPYING {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} {fembuilddir}"
|
|
]
|