############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = chrony version = 1.26 release = 9 groups = System/Daemons url = http://chrony.tuxfamily.org license = GPLv2 summary = An NTP client/server. description A client/server for the Network Time Protocol, this program keeps your computer's clock accurate. It was specially designed to support systems with intermittent internet connections, but it also works well in permanently connected environments. It can use also hardware reference clocks, system real-time clock or manual input as time references. end build requires bison libcap-devel libedit-devel readline-devel shadow-utils texinfo end configure_options = \ --prefix=/usr \ --with-sendmail=/usr/sbin/sendmail prepare_cmds %{create_user} end build_targets += getdate all docs install_targets += install-docs install_cmds mkdir -pv %{BUILDROOT}/var/{lib,log}/chrony touch %{BUILDROOT}/var/lib/chrony/{drift,rtc} mkdir -pv %{BUILDROOT}/etc install -m 644 -p %{DIR_SOURCE}/chrony.conf %{BUILDROOT}/etc/chrony.conf install -m 640 -p %{DIR_SOURCE}/chrony.keys %{BUILDROOT}/etc/chrony.keys chown -v root.chrony %{BUILDROOT}/etc/chrony.keys mkdir -pv %{BUILDROOT}/etc/dhcp/dhclient.d install -m 755 -p %{DIR_SOURCE}/chrony.dhclient \ %{BUILDROOT}/etc/dhcp/dhclient.d/chrony.sh mkdir -pv %{BUILDROOT}/etc/logrotate.d install -m 644 -p %{DIR_SOURCE}/chrony.logrotate \ %{BUILDROOT}/etc/logrotate.d/chrony mkdir -pv %{BUILDROOT}/usr/lib/chrony install -m 755 -p %{DIR_SOURCE}/chrony-helper %{BUILDROOT}/usr/lib/chrony-helper chown -Rv chrony.chrony %{BUILDROOT}/var/{lib,log}/chrony end end create_user getent group chrony >/dev/null || /usr/sbin/groupadd -r chrony getent passwd chrony >/dev/null || /usr/sbin/useradd -r -g chrony \ -d /var/lib/chrony -s /sbin/nologin chrony end packages package %{name} groups += Base configfiles /etc/chrony.conf /etc/chrony.keys end prerequires shadow-utils systemd-units end script prein %{create_user} end script postin /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl --no-reload enable \ chrony-wait.service chronyd.service >/dev/null 2>&1 || : end script preun /bin/systemctl --no-reload disable \ chrony-wait.service chronyd.service >/dev/null 2>&1 || : /bin/systemctl stop chrony-wait.service chronyd.service >/dev/null 2>&1 || : end script postup /bin/systemctl daemon-reload >/dev/null 2>&1 || : /bin/systemctl try-restart chronyd.service >/dev/null 2>&1 || : end end package %{name}-debuginfo template DEBUGINFO end end