42 lines
1.8 KiB
Python
42 lines
1.8 KiB
Python
pkgname = "cracklib"
|
|
pkgver = "2.10.3"
|
|
source = f"https://github.com/cracklib/cracklib/releases/download/v{pkgver}/cracklib-{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 -p {fembuilddir} && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.tar.xz && wget "
|
|
f"https://github.com/cracklib/cracklib/releases/download/v{pkgver}/cracklib-words-{pkgver}.xz",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && ./configure --prefix=/usr --disable-static --with-default-dict=/usr/lib/cracklib/pw_dict",
|
|
f"cd {builddir} && make -j$(nproc)",
|
|
f"cd {builddir} && make DESTDIR={destdir} install",
|
|
|
|
# install dictionary
|
|
f"mkdir -p {destdir}/usr/share/dict && xzcat ../cracklib-words-{pkgver}.xz > {destdir}/usr/share/dict/cracklib-words && "
|
|
f"ln -v -sf cracklib-words {destdir}/usr/share/dict/words && echo $(hostname) >> {destdir}/usr/share/dict/cracklib-extra-words",
|
|
|
|
f"install -v -m755 -d {destdir}/usr/lib/cracklib",
|
|
|
|
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}"
|
|
]
|
|
|
|
triggers = [
|
|
f"create-cracklib-dict /usr/share/dict/cracklib-words /usr/share/dict/cracklib-extra-words",
|
|
]
|