Files
fempkg_recipes/Net-SSLeay.recipe.py
T
2026-06-22 18:09:33 +02:00

29 lines
1.2 KiB
Python

pkgname = "Net-SSLeay"
pkgver = "1.96"
source = f"https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-{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 && wget "
f"https://www.linuxfromscratch.org/patches/blfs/svn/Net-SSLeay-{pkgver}-openssl4_fixes-2.patch",
# 64-bit build
f"cd {builddir} && patch -Np1 -i ../Net-SSLeay-1.96-openssl4_fixes-2.patch && yes '' | perl Makefile.PL",
f"cd {builddir} && make -j$(nproc)",
f"cd {builddir} && make test",
f"cd {builddir} && make DESTDIR={destdir} install",
# 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}"
]