1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Daniel Micay <danielmicay@gmail.com>
4 # Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
5 # Contributor: Patrick Leslie Polzer <leslie.polzer@gmx.net>
6 # Contributor: cdhotfire <cdhotfire@gmail.com>
7 # Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw>
8 # Contributor: Elisamuel Resto <ryuji@simplysam.us>
13 pkgdesc='Lightweight NTP client and server'
14 url='https://chrony.tuxfamily.org/'
17 depends=('glibc' 'libcap' 'libcap.so' 'libedit' 'libedit.so' 'libseccomp' 'libseccomp.so'
18 'nettle' 'libnettle.so' 'gnutls')
19 makedepends=('asciidoctor')
20 options=('!emptydirs')
21 backup=('etc/chrony.conf')
22 source=(https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz
23 ${pkgname}-${pkgver}.tar.gz.asc::https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}-tar-gz-asc.txt
26 sha256sums=('9d0da889a865f089a5a21610ffb6713e3c9438ce303a63b49c2fb6eaff5b8804'
28 '56aa817638c8f959169d514f1e7fc727ef31e7d3beda4fca5165292c7602ee42'
29 'c0b52787f68f3ef365eef64f53f22b4fb0046a91f0e38923f9d16f1ca19c3f3a')
30 b2sums=('51ba6d19312fd52cd6d6d8ab9437c886a3779877170674db6dc37d657e849101e2669fd6c8723d24e43c895cd1924c3d8d2ff442baeef9abe8a6c313929edf5f'
32 'e310a05f95d84741f7ddbbc496c52a9f603bb79afc47e57d291a92ae02efb630a357fda378ab5a11875c3997d073e05019d88dce7bbf4377a0228f328ba78fec'
33 'e709df2f97b523ef1c7a9dae3232ccbd235ac8f025eba866165272f8ba0372a0aba965d3aae1402395e43331bd629b9d8f3fbffd75fc254f4a7e5ecd47f73130')
35 '8F375C7E8D0EE125A3D3BD51537E2B76F7680DAC' # Miroslav Lichvar <mlichvar@redhat.com>
39 cd ${pkgname}-${pkgver}
41 -e 's|pool pool.ntp.org|pool 2.arch.pool.ntp.org|g' \
42 -e 's|server foo.example.net|server 0.arch.pool.ntp.org|g' \
43 -e 's|server bar.example.net|server 1.arch.pool.ntp.org|g' \
44 -e 's|server baz.example.net|server 3.arch.pool.ntp.org|g' \
45 examples/chrony.conf.example*
46 sed 's|/usr/sbin|/usr/bin|g' -i examples/*.service
50 cd ${pkgname}-${pkgver}
56 --with-sendmail=/usr/bin/sendmail \
57 --with-hwclockfile=/etc/adjtime \
59 --with-pidfile=/run/chrony/chronyd.pid
64 cd ${pkgname}-${pkgver}
69 cd ${pkgname}-${pkgver}
70 make DESTDIR="${pkgdir}" install install-docs
72 install -Dm 644 "${srcdir}/chrony.sysusers" "${pkgdir}/usr/lib/sysusers.d/chrony.conf"
73 install -Dm 644 "${srcdir}/chrony.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/chrony.conf"
74 install -Dm 644 examples/{chronyd,chrony-wait}.service -t "${pkgdir}/usr/lib/systemd/system"
75 install -Dm 644 examples/chrony.logrotate "${pkgdir}/etc/logrotate.d/chrony"
76 install -Dm 644 README NEWS FAQ -t "${pkgdir}/usr/share/doc/${pkgname}"
77 install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples"
78 echo "chronyd.service" | install -Dm 644 /dev/stdin "${pkgdir}/usr/lib/systemd/ntp-units.d/chrony.list"
80 install -Dm 644 examples/chrony.conf.example3 "${pkgdir}/etc/chrony.conf"
82 -e '/^! pool /s/^! //' \
83 -e '/^! leapsectz right\/UTC/s/^! //' \
84 -e '/^! makestep 1.0 3/s/^! //' \
85 -e '/^! rtcsync/s/^! //' \
86 "${pkgdir}/etc/chrony.conf"
88 rmdir "${pkgdir}"{/var/lib/chrony,/var/lib}