oops i forgot to commit
This commit is contained in:
32
libpwquality.recipe.py
Normal file
32
libpwquality.recipe.py
Normal file
@@ -0,0 +1,32 @@
|
||||
pkgname = "libpwquality"
|
||||
pkgver = "1.4.5"
|
||||
source = f"https://github.com/libpwquality/libpwquality/releases/download/libpwquality-{pkgver}/libpwquality-{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 = ["cracklib", "python"]
|
||||
|
||||
build = [
|
||||
# Extract
|
||||
f"mkdir -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.bz2",
|
||||
|
||||
# 64-bit build
|
||||
f"cd {builddir} && ./configure --prefix=/usr --disable-static --with-securedir=/usr/lib/security --disable-python-bindings",
|
||||
f"cd {builddir} && make -j$(nproc)",
|
||||
f"cd {builddir} && pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD/python",
|
||||
f"cd {builddir} && make DESTDIR={destdir} install",
|
||||
f"cd {builddir} && pip3 install --root={destdir} --no-index --find-links dist --no-user --force-reinstall --no-deps pwquality",
|
||||
|
||||
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