From 6b08fe59382d192c74040424fb56903e62cb7903 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sat, 4 May 2019 10:01:08 -0700 Subject: Initial commit --- PKGBUILD | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ chrony.sysusers | 1 + chrony.tmpfiles | 1 + 3 files changed, 77 insertions(+) create mode 100644 PKGBUILD create mode 100644 chrony.sysusers create mode 100644 chrony.tmpfiles diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..3e6a37c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# 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.4 +pkgrel=2 +pkgdesc='Lightweight NTP client and server' +url='https://chrony.tuxfamily.org/' +arch=('x86_64') +license=('GPL2') +depends=('glibc' 'nss' 'readline' 'libcap' 'libedit' 'libseccomp' '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) +sha256sums=('af77e47c2610a7e55c8af5b89a8aeff52d9a867dd5983d848b52d374bc0e6b9f' + 'SKIP' + '56aa817638c8f959169d514f1e7fc727ef31e7d3beda4fca5165292c7602ee42' + 'c0b52787f68f3ef365eef64f53f22b4fb0046a91f0e38923f9d16f1ca19c3f3a') +validpgpkeys=('8B1F4A9ADA73D401E3085A0B5FF06F29BA1E013B') # Miroslav Lichvar has a dsa1024 key *in the wild* + +prepare() { + cd ${pkgname}-${pkgver} + sed -i \ + -e 's|pool.ntp.org|3.arch.pool.ntp.org|g' \ + -e 's|server foo.example.net|server 0.arch.pool.ntp.org iburst|g' \ + -e 's|server bar.example.net|server 1.arch.pool.ntp.org iburst|g' \ + -e 's|server baz.example.net|server 2.arch.pool.ntp.org iburst|g' \ + examples/chrony.conf.example* +} + +build() { + cd ${pkgname}-${pkgver} + ./configure \ + --prefix=/usr \ + --enable-scfilter \ + --enable-ntp-signd \ + --with-user=chrony \ + --with-sendmail=/usr/bin/sendmail \ + --with-hwclockfile=/etc/adjtime + make +} + +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" + + mkdir -p ${pkgdir}/etc/chrony + install -Dm 644 examples/chrony.conf.example3 "${pkgdir}/etc/chrony/chrony.conf" + echo -e "\n# Enable kernel RTC sync\nrtcsync" >> "${pkgdir}/etc/chrony/chrony.conf" + sed -i '/^! rtconutc$/ s/^! //' "${pkgdir}/etc/chrony/chrony.conf" + + mv "${pkgdir}/usr/sbin/chronyd" "${pkgdir}/usr/bin" + rmdir "${pkgdir}"{/usr/sbin,/var/lib/chrony,/var/lib} +} diff --git a/chrony.sysusers b/chrony.sysusers new file mode 100644 index 0000000..ef5b6d3 --- /dev/null +++ b/chrony.sysusers @@ -0,0 +1 @@ +u chrony - "Network Time Protocol" /var/lib/chrony diff --git a/chrony.tmpfiles b/chrony.tmpfiles new file mode 100644 index 0000000..c2e12d8 --- /dev/null +++ b/chrony.tmpfiles @@ -0,0 +1 @@ +d /var/lib/chrony 0755 chrony chrony - - -- cgit v1.2.1