94 lines
3.4 KiB
Bash
94 lines
3.4 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=chrony
|
|
pkgver=4.5
|
|
pkgrel=02
|
|
pkgdesc='Lightweight NTP client and server w/o systemd & ipv6'
|
|
url='https://chrony.tuxfamily.org/'
|
|
depends=('glibc' 'libcap' 'libcap.so' 'libedit' 'libedit.so' 'libseccomp' 'libseccomp.so'
|
|
'nettle' 'libnettle.so' 'gnutls')
|
|
makedepends=('asciidoctor')
|
|
options=('!emptydirs')
|
|
backup=('etc/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)
|
|
|
|
prepare() {
|
|
cd ${pkgname}-${pkgver}
|
|
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*
|
|
sed 's|/usr/sbin|/usr/bin|g' -i examples/*.service
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-scfilter \
|
|
--enable-ntp-signd \
|
|
--with-user=chrony \
|
|
--with-sendmail=/usr/bin/sendmail \
|
|
--with-hwclockfile=/etc/adjtime \
|
|
--sbindir=/usr/bin \
|
|
--disable-ipv6 \
|
|
--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"
|
|
## no way to configure building without systemd services but does build without it
|
|
## systemd service files are provided by default. Both runit and s6 scripts are available
|
|
## install -Dm 644 examples/{chronyd,chrony-wait}.service -t "${pkgdir}/usr/lib/systemd/system"
|
|
## echo "chronyd.service" | install -Dm 644 /dev/stdin "${pkgdir}/usr/lib/systemd/ntp-units.d/chrony.list"
|
|
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.conf"
|
|
sed -i \
|
|
-e '/^! pool /s/^! //' \
|
|
-e '/^! leapsectz right\/UTC/s/^! //' \
|
|
-e '/^! makestep 1.0 3/s/^! //' \
|
|
-e '/^! rtcsync/s/^! //' \
|
|
"${pkgdir}/etc/chrony.conf"
|
|
|
|
rmdir "${pkgdir}"{/var/lib/chrony,/var/lib}
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('GPL2')
|
|
|
|
validpgpkeys=(8F375C7E8D0EE125A3D3BD51537E2B76F7680DAC) # Miroslav Lichvar <mlichvar@redhat.com>
|
|
|
|
sha256sums=(19fe1d9f4664d445a69a96c71e8fdb60bcd8df24c73d1386e02287f7366ad422 # chrony-4.5.tar.gz
|
|
71381c92097588e139474ffca93b1261b56df1fca09a5ea2cf34f7fae0a4a379 # chrony-4.5.tar.gz.asc
|
|
56aa817638c8f959169d514f1e7fc727ef31e7d3beda4fca5165292c7602ee42 # chrony.sysusers
|
|
c0b52787f68f3ef365eef64f53f22b4fb0046a91f0e38923f9d16f1ca19c3f3a) # chrony.tmpfiles
|
|
|
|
## 3d3df8dd672e9f330e2467be1d4bbaf12dc4eefdc4f81c90a753762133376633 chrony-4.5-02-x86_64.pkg.tar.lz
|
|
|