]>
Commit | Line | Data |
---|---|---|
164c0d73 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
164c0d73 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = chrony |
5ca51812 | 7 | version = 4.3 |
519c4188 | 8 | release = 2 |
164c0d73 | 9 | |
f43608d2 | 10 | groups = System/Daemons |
9296f2a8 | 11 | url = https://chrony.tuxfamily.org |
802ea3af MT |
12 | license = GPLv2 |
13 | summary = An NTP client/server. | |
164c0d73 | 14 | |
802ea3af | 15 | description |
164c0d73 MT |
16 | A client/server for the Network Time Protocol, this program keeps your |
17 | computer's clock accurate. It was specially designed to support | |
18 | systems with intermittent internet connections, but it also works well | |
19 | in permanently connected environments. It can use also hardware reference | |
20 | clocks, system real-time clock or manual input as time references. | |
802ea3af MT |
21 | end |
22 | ||
9296f2a8 MT |
23 | source_dl = https://download.tuxfamily.org/chrony/ |
24 | ||
802ea3af MT |
25 | build |
26 | requires | |
27 | bison | |
28 | libcap-devel | |
29 | libedit-devel | |
9296f2a8 | 30 | nettle-devel |
802ea3af MT |
31 | readline-devel |
32 | shadow-utils | |
33 | texinfo | |
34 | end | |
35 | ||
36 | configure_options = \ | |
37 | --prefix=/usr \ | |
38 | --with-sendmail=/usr/sbin/sendmail | |
39 | ||
40 | prepare_cmds | |
41 | %{create_user} | |
42 | end | |
43 | ||
44 | build_targets += getdate all docs | |
45 | install_targets += install-docs | |
164c0d73 | 46 | |
802ea3af MT |
47 | install_cmds |
48 | mkdir -pv %{BUILDROOT}/var/{lib,log}/chrony | |
49 | touch %{BUILDROOT}/var/lib/chrony/{drift,rtc} | |
164c0d73 | 50 | |
802ea3af MT |
51 | mkdir -pv %{BUILDROOT}/etc |
52 | install -m 644 -p %{DIR_SOURCE}/chrony.conf %{BUILDROOT}/etc/chrony.conf | |
53 | install -m 640 -p %{DIR_SOURCE}/chrony.keys %{BUILDROOT}/etc/chrony.keys | |
54 | chown -v root.chrony %{BUILDROOT}/etc/chrony.keys | |
164c0d73 | 55 | |
802ea3af MT |
56 | chown -Rv chrony.chrony %{BUILDROOT}/var/{lib,log}/chrony |
57 | end | |
58 | end | |
164c0d73 | 59 | |
802ea3af MT |
60 | create_user |
61 | getent group chrony >/dev/null || /usr/sbin/groupadd -r chrony | |
62 | getent passwd chrony >/dev/null || /usr/sbin/useradd -r -g chrony \ | |
63 | -d /var/lib/chrony -s /sbin/nologin chrony | |
64 | end | |
164c0d73 | 65 | |
802ea3af MT |
66 | packages |
67 | package %{name} | |
f43608d2 MT |
68 | groups += Base |
69 | ||
802ea3af MT |
70 | configfiles |
71 | /etc/chrony.conf | |
72 | /etc/chrony.keys | |
73 | end | |
1f9bc2f0 | 74 | |
7d9b1d61 SS |
75 | prerequires |
76 | shadow-utils | |
77 | systemd-units | |
78 | end | |
eef76e84 | 79 | |
802ea3af MT |
80 | script prein |
81 | %{create_user} | |
82 | end | |
1f9bc2f0 | 83 | |
802ea3af | 84 | script postin |
eef76e84 MT |
85 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : |
86 | /bin/systemctl --no-reload enable \ | |
87 | chrony-wait.service chronyd.service >/dev/null 2>&1 || : | |
802ea3af | 88 | end |
1f9bc2f0 | 89 | |
802ea3af MT |
90 | script preun |
91 | /bin/systemctl --no-reload disable \ | |
eef76e84 MT |
92 | chrony-wait.service chronyd.service >/dev/null 2>&1 || : |
93 | /bin/systemctl stop chrony-wait.service chronyd.service >/dev/null 2>&1 || : | |
802ea3af | 94 | end |
1f9bc2f0 | 95 | |
802ea3af | 96 | script postup |
eef76e84 MT |
97 | /bin/systemctl daemon-reload >/dev/null 2>&1 || : |
98 | /bin/systemctl try-restart chronyd.service >/dev/null 2>&1 || : | |
802ea3af MT |
99 | end |
100 | end | |
1f9bc2f0 MT |
101 | |
102 | package %{name}-debuginfo | |
103 | template DEBUGINFO | |
104 | end | |
802ea3af | 105 | end |