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
This commit is contained in:
Артем Синюгин 2024-11-20 12:02:10 +03:00
parent c8fa3e4215
commit 95ce87b365

View File

@ -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 <writers@altlinux.org> 1.0.2-alt1