Femboyos 2 full rewrite full working CI
This commit is contained in:
39
cpio.recipe.py
Normal file
39
cpio.recipe.py
Normal file
@@ -0,0 +1,39 @@
|
||||
pkgname = "cpio"
|
||||
pkgver = "2.15"
|
||||
source = f"https://ftpmirror.gnu.org/gnu/cpio/cpio-{pkgver}.tar.bz2"
|
||||
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 = []
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.bz2",
|
||||
|
||||
# 64-bit build
|
||||
f"cd {builddir} && sed -e \"/^extern int (\\*xstat)/s/()/(const char * restrict, struct stat * restrict)/\" -i src/extern.h && "
|
||||
f"sed -e \"/^int (\\*xstat)/s/()/(const char * restrict, struct stat * restrict)/\" -i src/global.c",
|
||||
|
||||
f"cd {builddir} && ./configure --prefix=/usr --enable-mt --with-rmt=/usr/libexec/rmt",
|
||||
f"cd {builddir} && make -j$(nproc)",
|
||||
f"cd {builddir} && makeinfo --html -o doc/html doc/cpio.texi && makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi && makeinfo "
|
||||
f"--plaintext -o doc/cpio.txt doc/cpio.texi",
|
||||
|
||||
f"cd {builddir} && make DESTDIR={destdir} install",
|
||||
|
||||
f"cd {builddir} && install -v -m755 -d {destdir}/usr/share/doc/cpio-{pkgver}/html && install -v "
|
||||
F"-m644 doc/html/* {destdir}/usr/share/doc/cpio-{pkgver}/html && install -v -m644 doc/cpio.{{html,txt}} {destdir}/usr/share/doc/cpio-{pkgver}",
|
||||
|
||||
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}"
|
||||
]
|
||||
Reference in New Issue
Block a user