forked from FemboyOS/fempkg_recipes
Femboyos 2 full rewrite full working CI
This commit is contained in:
37
libxcrypt.recipe.py
Normal file
37
libxcrypt.recipe.py
Normal file
@@ -0,0 +1,37 @@
|
||||
pkgname = "libxcrypt"
|
||||
pkgver = "4.5.2"
|
||||
source = f"https://github.com/besser82/libxcrypt/releases/download/v{pkgver}/libxcrypt-{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 = []
|
||||
|
||||
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} && ./configure --prefix=/usr --enable-hashes=strong,glibc --enable-obsolete-api=no --disable-static --disable-failure-tokens",
|
||||
f"cd {builddir} && make -j$(nproc)",
|
||||
f"cd {builddir} && make DESTDIR={destdir} install",
|
||||
|
||||
# 32-bit build
|
||||
f"cd {builddir} && make distclean",
|
||||
f"cd {builddir} && CC=\"gcc -m32\" ./configure --prefix=/usr --host=i686-pc-linux-gnu --libdir=/usr/lib32 --enable-hashes=strong,glibc --enable-obsolete-api=glibc --disable-static --disable-failure-tokens",
|
||||
f"cd {builddir} && make -j$(nproc)",
|
||||
f"cd {builddir} && mkdir -p {destdir}/usr/lib32 && cp -av .libs/libcrypt.so* {destdir}/usr/lib32/ && make DESTDIR={destdir} install-pkgconfigDATA && "
|
||||
f"ln -svf libxcrypt.pc {destdir}/usr/lib32/pkgconfig/libcrypt.pc",
|
||||
|
||||
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
||||
f"install -v -m644 {builddir}/COPYING.LIB {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 {fembuilddir}"
|
||||
]
|
||||
Reference in New Issue
Block a user