forked from FemboyOS/fempkg_recipes
Femboyos 2 full rewrite full working CI
This commit is contained in:
37
perl.recipe.py
Normal file
37
perl.recipe.py
Normal file
@@ -0,0 +1,37 @@
|
||||
pkgname = "perl"
|
||||
pkgver = "5.42.0"
|
||||
version = pkgver[:4]
|
||||
ver = pkgver[:1] + ".0"
|
||||
source = f"https://www.cpan.org/src/{ver}/perl-{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} && export BUILD_ZLIB=False && export BUILD_BZIP2=0 && sh Configure -des -D prefix=/usr -D vendorprefix=/usr"
|
||||
f" -D privlib=/usr/lib/perl5/{version}/core_perl -D archlib=/usr/lib/perl5/{version}/core_perl -D"
|
||||
f" sitelib=/usr/lib/perl5/{version}/site_perl -D sitearch=/usr/lib/perl5/{version}/site_perl -D"
|
||||
f" vendorlib=/usr/lib/perl5/{version}/vendor_perl -D vendorarch=/usr/lib/perl5/{version}/vendor_perl -D"
|
||||
f" man1dir=/usr/share/man/man1 -D man3dir=/usr/share/man/man3 -D pager=\"/usr/bin/less -isR\" -D useshrplib -D usethreads",
|
||||
|
||||
f"cd {builddir} && export BUILD_ZLIB=False && export BUILD_BZIP2=0 && make -j$(nproc)",
|
||||
f"cd {builddir} && export BUILD_ZLIB=False && export BUILD_BZIP2=0 && make DESTDIR={destdir} install",
|
||||
|
||||
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 {fembuilddir}"
|
||||
]
|
||||
Reference in New Issue
Block a user