git » ntp.git » main » tree

[main] / PKGBUILD

# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>

pkgname=ntp
_pkgname=ntp #-dev
_pkgver=4.2.8p17
pkgver=${_pkgver/p/.p}
pkgrel=1
pkgdesc='Network Time Protocol reference implementation'
url='https://www.ntp.org/'
license=('custom')
arch=('armv7h' 'aarch64')
depends=('openssl' 'perl' 'libcap' 'readline')
backup=('etc/ntp.conf')
source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz"
        'ntp.conf'
        'ntpd.service'
        'ntpdate.service'
        'ntp.sysusers')
options=('!emptydirs')

build() {
	cd "${_pkgname}-${_pkgver}"

	./configure --prefix=/usr \
            --bindir=/usr/sbin    \
            --sysconfdir=/etc     \
            --enable-linuxcaps    \
            --with-lineeditlibs=readline \
		--enable-ntp-signd 
	make
}

package() {
	cd "${_pkgname}-${_pkgver}"

	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
	install -Dm644 ../ntp.sysusers "${pkgdir}"/usr/lib/sysusers.d/ntp.conf
	install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -d -o 87 "${pkgdir}"/var/lib/ntp
	echo > "${pkgdir}/var/lib/ntp/.placeholder"
}
sha256sums=('103dd272e6a66c5b8df07dce5e9a02555fcd6f1397bdfb782237328e89d3a866'
            'abccefe0b3a65cd375d5071ce780be8d2d205439aa6d34bcd3c56de6e80ba821'
            'a02a7d5d32af8061fdadd341567627335d61e0e23651e664af8397e9261e47f3'
            '1f0541c08891df45ba8a2f181823a782272415ef6e361197d462a2c579ad4121'
            'f839a3b6d8e64fcd9332274131b4d5aa0b2c272db072dc310af1735ef286746a')