pkgname = "libblockdev" pkgver = "3.4.0" source = f"https://github.com/storaged-project/libblockdev/releases/download/{pkgver}/libblockdev-{pkgver}.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 = ["glib", "cryptsetup", "keyutils", "libatasmart", "libbytesize", "libnvme", "LVM2"] build = [ # Extract f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.gz", # 64-bit build f"cd {builddir} && ./configure --prefix=/usr --sysconfdir=/etc --with-python3 --without-escrow --without-gtk-doc --without-lvm --without-lvm_dbus --without-nvdimm --without-tools --without-smartmontools", f"cd {builddir} && make -j$(nproc)", f"cd {builddir} && 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} {fembuilddir}" ]