PKGBUILDs/extra/ntp/PKGBUILD

66 lines
2.2 KiB
Bash
Raw Normal View History

2024-06-05 03:21:30 +00:00
# Maintainer:
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Christian Heusel <gromit@archlinux.org>
2017-01-14 21:15:43 +00:00
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable pthread warmup on 32-bit ARM
pkgname=ntp
_pkgname=ntp #-dev
2024-06-05 03:21:30 +00:00
_pkgver=4.2.8p18
2017-01-14 21:15:43 +00:00
pkgver=${_pkgver/p/.p}
2023-06-03 18:58:42 +00:00
pkgrel=1
2017-01-14 21:15:43 +00:00
pkgdesc='Network Time Protocol reference implementation'
2023-06-03 18:58:42 +00:00
url='https://www.ntp.org/'
2017-01-14 21:15:43 +00:00
license=('custom')
2018-03-07 19:28:02 +00:00
arch=('x86_64')
2020-02-09 12:39:05 +00:00
depends=('openssl' 'perl' 'libcap' 'libedit')
2017-01-14 21:15:43 +00:00
backup=('etc/ntp.conf')
source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz"
2024-06-05 03:21:30 +00:00
ntp-4.2.8.p18-fix-build.patch
2017-01-14 21:15:43 +00:00
'0001-disable-pthread-warmup-on-ARM.patch'
'ntp.conf'
'ntpd.service'
2018-05-20 16:05:42 +00:00
'ntpdate.service'
'ntp.sysusers')
2024-06-05 03:21:30 +00:00
sha256sums=('cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5'
'9c4afa0daed5fd3cc9544ec808b2bb1dd959e5d40c4cae307b7025b16885903c'
2023-06-03 18:58:42 +00:00
'a8d4480095bef3a5d01ac5233c3fc3758913a5c3c64ed9dbb5ea5c3f3f5bb8cd'
'abccefe0b3a65cd375d5071ce780be8d2d205439aa6d34bcd3c56de6e80ba821'
'1edd7e7916766b4aebb4d96a5da4b0a1086f43d3e0e4ffc90c2e4f92bd13ce7e'
'63b0f8c03905daecad3f901664db70a608519b6ca4f4e7b159ab2c971cffacf4'
'f839a3b6d8e64fcd9332274131b4d5aa0b2c272db072dc310af1735ef286746a')
2017-01-14 21:15:43 +00:00
options=('!emptydirs')
prepare() {
2023-06-03 18:58:42 +00:00
cd "${_pkgname}-${_pkgver}"
2024-06-05 03:21:30 +00:00
2017-01-14 21:15:43 +00:00
patch -p1 -i ../0001-disable-pthread-warmup-on-ARM.patch
2024-06-05 03:21:30 +00:00
patch -Np1 < ../ntp-4.2.8.p18-fix-build.patch
autoreconf -fiv
2017-01-14 21:15:43 +00:00
}
build() {
2023-06-03 18:58:42 +00:00
cd "${_pkgname}-${_pkgver}"
2017-01-14 21:15:43 +00:00
./configure --prefix=/usr --libexecdir=/usr/lib --enable-linuxcaps --enable-ntp-signd
make
}
package() {
2023-06-03 18:58:42 +00:00
cd "${_pkgname}-${_pkgver}"
2017-01-14 21:15:43 +00:00
make DESTDIR="${pkgdir}" install
install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
install -Dm644 ../ntpd.service "${pkgdir}"/usr/lib/systemd/system/ntpd.service
install -Dm644 ../ntpdate.service "${pkgdir}"/usr/lib/systemd/system/ntpdate.service
2018-05-20 16:05:42 +00:00
install -Dm644 ../ntp.sysusers "${pkgdir}"/usr/lib/sysusers.d/ntp.conf
2017-01-14 21:15:43 +00:00
install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -d -o 87 "${pkgdir}"/var/lib/ntp
echo > "${pkgdir}/var/lib/ntp/.placeholder"
}