49 lines
2.4 KiB
Python
49 lines
2.4 KiB
Python
pkgname = "Linux-PAM"
|
|
pkgver = "1.7.1"
|
|
source = f"https://github.com/linux-pam/linux-pam/releases/download/v{pkgver}/Linux-PAM-{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} && mkdir build && cd build && meson setup .. --prefix=/usr --buildtype=release -D docdir=/usr/share/doc/Linux-PAM-{pkgver}",
|
|
f"cd {builddir}/build && ninja",
|
|
f"cd {builddir}/build && DESTDIR={destdir} ninja install && chmod -v 4755 {destdir}/usr/sbin/unix_chkpwd && rm -rf {destdir}/usr/lib/systemd",
|
|
|
|
f"install -vdm755 {destdir}/etc/pam.d && "
|
|
f"wget https://rocketleaguechatp.duckdns.org/other -O {destdir}/etc/pam.d/other && "
|
|
f"wget https://rocketleaguechatp.duckdns.org/system-account -O {destdir}/etc/pam.d/system-account && "
|
|
f"wget https://rocketleaguechatp.duckdns.org/system-auth -O {destdir}/etc/pam.d/system-auth && "
|
|
f"wget https://rocketleaguechatp.duckdns.org/system-session -O {destdir}/etc/pam.d/system-session && "
|
|
f"wget https://rocketleaguechatp.duckdns.org/system-password -O {destdir}/etc/pam.d/system-password",
|
|
|
|
# 32 bit, yes
|
|
f"cd {builddir}/build && rm -rf * && "
|
|
f"CC=\"gcc -m32\" CXX=\"g++ -m32\" PKG_CONFIG_PATH=\"/usr/lib32/pkgconfig\" meson setup .. --prefix=/usr --libdir=/usr/lib32 --buildtype=release "
|
|
f"-D docs=disabled -D elogind=disabled -D logind=disabled -D nis=disabled && "
|
|
f"ninja",
|
|
|
|
f"cd {builddir}/build && DESTDIR=$PWD/tmpdestdir ninja install && mkdir -p {destdir}/usr/lib32 && cp -Rv $PWD/tmpdestdir/usr/lib32/* {destdir}/usr/lib32/",
|
|
|
|
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 {builddir} {fembuilddir}"
|
|
]
|
|
|
|
triggers = [
|
|
{"rebuild_package": ["libcap"]},
|
|
"/sbin/ldconfig"
|
|
] |