# Maintainer: jc_gargma # Maintainer (Arch): Levente Polyak # Contributor (Arch): Sergej Pupykin # Contributor (Arch): Daniel Micay # Contributor (Arch): Bartłomiej Piotrowski # Contributor (Arch): Patrick Leslie Polzer # Contributor (Arch): cdhotfire # Contributor (Arch): Shinlun Hsieh # Contributor (Arch): Elisamuel Resto # # I maintain this because: # Arch version is not configured for openrc # Arch version uses /etc/chrony.conf instead of /etc/chrony/chrony.conf pkgname=chrony pkgver=3.5.1 pkgrel=1 pkgdesc='Lightweight NTP client and server' url='https://chrony.tuxfamily.org/' arch=('x86_64') license=('GPL2') depends=('glibc' 'nss' 'readline' 'libcap' 'libcap.so' 'libedit' 'libseccomp' 'libseccomp.so' 'nettle') makedepends=('asciidoctor') options=('!emptydirs') backup=('etc/chrony/chrony.conf') source=(https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz ${pkgname}-${pkgver}.tar.gz.asc::https://download.tuxfamily.org/chrony/${pkgname}-${pkgver}-tar-gz-asc.txt chrony.sysusers chrony.tmpfiles fix-util-unit-test-for-NTP-era-split.patch) b2sums=('503402c0dd68a340eb5ecd8b57dcb83d90124f31e8deb6e20bd1e9ed19b5dc952fa7f40a697d0d0cb77c349c9f3297dcd32265d77670a71836ba8709dcc83053' 'SKIP' 'e310a05f95d84741f7ddbbc496c52a9f603bb79afc47e57d291a92ae02efb630a357fda378ab5a11875c3997d073e05019d88dce7bbf4377a0228f328ba78fec' 'e709df2f97b523ef1c7a9dae3232ccbd235ac8f025eba866165272f8ba0372a0aba965d3aae1402395e43331bd629b9d8f3fbffd75fc254f4a7e5ecd47f73130' '210e5c1e80c0a13b3c96369837d86d9ae5350b30baeac6f2e4dd2bc780c476a5e900270edfe75a7bd501a28194448d45491c2920c58f4ab7895f47af25858226') validpgpkeys=('8B1F4A9ADA73D401E3085A0B5FF06F29BA1E013B') # Miroslav Lichvar has a dsa1024 key *in the wild* prepare() { cd ${pkgname}-${pkgver} patch -Np1 < ../fix-util-unit-test-for-NTP-era-split.patch sed -i \ -e 's|pool pool.ntp.org|pool 2.arch.pool.ntp.org|g' \ -e 's|server foo.example.net|server 0.arch.pool.ntp.org|g' \ -e 's|server bar.example.net|server 1.arch.pool.ntp.org|g' \ -e 's|server baz.example.net|server 3.arch.pool.ntp.org|g' \ examples/chrony.conf.example* } build() { cd ${pkgname}-${pkgver} export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4 -fPIE" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4 -fPIE" export LDFLAGS="$LDFLAGS,-pie" ./configure \ --prefix=/usr \ --enable-scfilter \ --enable-ntp-signd \ --with-user=chrony \ --with-sendmail=/usr/bin/sendmail \ --with-hwclockfile=/etc/adjtime \ --sbindir=/usr/bin \ --with-pidfile=/run/chrony/chronyd.pid make } check() { cd ${pkgname}-${pkgver} make check } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install install-docs install -Dm 644 "${srcdir}/chrony.sysusers" "${pkgdir}/usr/lib/sysusers.d/chrony.conf" install -Dm 644 "${srcdir}/chrony.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/chrony.conf" install -Dm 644 examples/chrony.logrotate "${pkgdir}/etc/logrotate.d/chrony" install -Dm 644 README NEWS FAQ -t "${pkgdir}/usr/share/doc/${pkgname}" install -Dm 644 examples/* -t "${pkgdir}/usr/share/doc/${pkgname}/examples" install -Dm 644 examples/chrony.conf.example3 "${pkgdir}/etc/chrony/chrony.conf" sed -i \ -e '/^! pool /s/^! //' \ -e '/^! leapsectz right\/UTC/s/^! //' \ -e '/^! makestep 1.0 3/s/^! //' \ -e '/^! rtcsync/s/^! //' \ "${pkgdir}/etc/chrony/chrony.conf" rmdir "${pkgdir}"{/var/lib/chrony,/var/lib} }