forked from FemboyOS/fempkg_recipes
55 lines
2.1 KiB
Python
55 lines
2.1 KiB
Python
pkgname = "fcron"
|
|
pkgver = "3.4.0"
|
|
source = f"http://fcron.free.fr/archives/fcron-{pkgver}.src.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 /tmp/fempkg/build {fembuilddir} || true && cd {fembuilddir} && tar -xvf /var/lib/fempkg/pkgs/{pkgname}-{pkgver}.src.tar.gz",
|
|
|
|
# 64-bit build
|
|
f"cd {builddir} && find doc -type f -exec sed -i 's:/usr/local::g' {{}} \\;",
|
|
f"cd {builddir} && ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --without-sendmail --with-boot-install=no --with-systemdsystemunitdir=no",
|
|
f"cd {builddir} && make -j$(nproc)",
|
|
f"mkdir -p {destdir}/etc/pam.d",
|
|
f"cd {builddir} && make DESTDIR={destdir} install",
|
|
|
|
f"install -v -d -m755 {destdir}/usr/share/licenses/{pkgname}/",
|
|
f"install -v -m644 {builddir}/LICENSE {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",
|
|
|
|
f"wget https://rocketleaguechatp.duckdns.org/run-parts -O {destdir}/usr/bin/run-parts",
|
|
f"install -vdm754 {destdir}/etc/cron.{{hourly,daily,weekly,monthly}}",
|
|
f"wget https://rocketleaguechatp.duckdns.org/systab.orig -O {destdir}/var/spool/fcron/systab.orig",
|
|
f"chmod -v 755 {destdir}/usr/bin/run-parts",
|
|
|
|
# Cleanup
|
|
f"rm -rf {builddir} {fembuilddir}"
|
|
]
|
|
|
|
triggers = [
|
|
f"groupadd -g 22 fcron || true",
|
|
f"useradd -d /dev/null -c \"Fcron User\" -g fcron -s /bin/false -u 22 fcron || true",
|
|
f"""if grep -Fq "cron.*" /etc/syslog.conf; then
|
|
echo "cron.* already exists — skipping."
|
|
else
|
|
echo "cron.* not found — appending entry."
|
|
cat >> /etc/syslog.conf << "EOF"
|
|
# Begin fcron addition to /etc/syslog.conf
|
|
|
|
cron.* -/var/log/cron.log
|
|
|
|
# End fcron addition
|
|
EOF
|
|
fi
|
|
""",
|
|
] |