Femboyos 2 full rewrite full working CI
This commit is contained in:
41
zstd.recipe.py
Normal file
41
zstd.recipe.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# zstd.recipe.py
|
||||
pkgname = "zstd"
|
||||
pkgver = "1.5.7"
|
||||
source = f"https://github.com/facebook/zstd/releases/download/v{pkgver}/zstd-{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 = []
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.gz",
|
||||
|
||||
# 64-bit build
|
||||
f"cd {builddir} && make prefix=/usr -j$(nproc)",
|
||||
f"cd {builddir} && make prefix=/usr DESTDIR={destdir} install",
|
||||
f"cd {builddir} && rm -v {destdir}/usr/lib/libzstd.a",
|
||||
|
||||
# Clean for 32-bit
|
||||
f"cd {builddir} && make clean",
|
||||
f"cd {builddir} && rm -f config.log",
|
||||
|
||||
# 32-bit build
|
||||
f"cd {builddir} && CC=\"gcc -m32\" make prefix=/usr",
|
||||
f"cd {builddir} && make prefix=/usr DESTDIR=$PWD/tmpdestdir install && mkdir -p {destdir}/usr/lib32 && cp -Rv {builddir}/tmpdestdir/usr/lib/* {destdir}/usr/lib32/",
|
||||
f"cd {builddir} && sed -e \"/^libdir/s/lib$/lib32/\" -i {destdir}/usr/lib32/pkgconfig/libzstd.pc",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {builddir}/COPYING {destdir}/usr/share/licenses/{pkgname}/LICENSE.GPLv2",
|
||||
f"install -v -m644 {builddir}/LICENSE {destdir}/usr/share/licenses/{pkgname}/LICENSE.BSD",
|
||||
|
||||
# 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