106 lines
2.6 KiB
Plaintext
106 lines
2.6 KiB
Plaintext
###############################################################################
|
|
# IPFire.org - An Open Source Firewall Solution #
|
|
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
|
|
###############################################################################
|
|
|
|
name = chrony
|
|
version = 4.3
|
|
release = 2
|
|
|
|
groups = System/Daemons
|
|
url = https://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
|
|
|
|
source_dl = https://download.tuxfamily.org/chrony/
|
|
|
|
build
|
|
requires
|
|
bison
|
|
libcap-devel
|
|
libedit-devel
|
|
nettle-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
|
|
|
|
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
|