From 95ce87b365b07865ebe3ac16717e755028f76af6 Mon Sep 17 00:00:00 2001 From: sinjuginas Date: Wed, 20 Nov 2024 12:02:10 +0300 Subject: [PATCH] Spec file update: - now it provides 'virtual' package 'cron-subsystem'; - more packages added to conflicts; - paths patch added; - commands in build and install sections were replaced with macros; - files section big update --- .gear/systemd-crontab-generator.spec | 50 ++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/.gear/systemd-crontab-generator.spec b/.gear/systemd-crontab-generator.spec index 6b96991..0afc3cf 100644 --- a/.gear/systemd-crontab-generator.spec +++ b/.gear/systemd-crontab-generator.spec @@ -15,12 +15,21 @@ Source0: %name-%version.tar Patch0: %name-%version-%release.patch Patch1: allow_deprecated_rustc-serialize.patch Patch2: makefile_install_fix.patch +Patch3: fix_paths.patch + +Requires(pre): crontab-control +Requires: vitmp + +Conflicts: cronie +Conflicts: cronie-anacron +Conflicts: vixie-cron +Conflicts: systemd-cron + +Provides: cron-subsystem BuildRequires: /proc BuildRequires: rust-cargo -Conflicts: vixie-cron - %description %summary. It works by parsing crontab and anacrontab files from usual places like @@ -34,17 +43,46 @@ It's intended to be a drop-in replacement for all cron implementations. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build ./configure -make +%make %install -make DESTDIR="%buildroot" install +%makeinstall_std +mkdir -p %buildroot%_sysconfdir && touch %buildroot%_sysconfdir/cron.{allow,deny} + +%pre +%pre_control crontab + +%post +%post_control crontab +%systemd_post cron.target +if [ $1 -eq 1 ] ; then + systemctl daemon-reload + systemctl enable --now cron.target +fi + +%preun +%systemd_preun cron.target + +postun +%postun +%systemd_postun_with_restart cron.target %files -%_usr/local/bin/crontab -%_usr/local/lib/*/*/* +%attr(700,root,root) %_bindir/crontab +%attr(640,root,crontab) %ghost %_sysconfdir/cron.allow +%attr(640,root,crontab) %config(noreplace) %_sysconfdir/cron.deny +%attr(700,root,root) %_libexecdir/systemd/system-generators/systemd-crontab-generator +%attr(700,root,root) %_libexecdir/systemd-cron/* +%_man1dir/crontab.* +%_man5dir/crontab.* +%_man5dir/anacrontab.* +%_man7dir/systemd.cron.* +%_man8dir/systemd-crontab-generator.* +/usr/lib/systemd/system/cron* %changelog * Thu Nov 12 2024 Artyom Sinyugin 1.0.2-alt1