summaryrefslogtreecommitdiff
path: root/extra/ntp/PKGBUILD
blob: 0d2396f64ea0544d945b36a0747f79cdee20eb60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# $Id: PKGBUILD 212134 2014-05-08 17:10:10Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>

pkgname=ntp
_pkgname=ntp-dev
_pkgver=4.2.7p441
pkgver=${_pkgver/p/.p}
pkgrel=1
pkgdesc='Network Time Protocol reference implementation'
url='http://www.ntp.org/'
license=('custom')
arch=('i686' 'x86_64')
makedepends=('perl-html-parser')
depends=('openssl' 'libcap' 'libedit')
backup=('etc/ntp.conf')
source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/${_pkgname}/${_pkgname}-${_pkgver}.tar.gz"
        'ntp.conf'
        'ntpd.service'
        'ntpdate.service')
sha1sums=('81444413350982f92f99885f201b50df24a14201'
          'd3496dbeb7d531dd6ab071dbce3262c3c9618d8b'
          'dd24216e8333e12d5080965696602591c72537b1'
          '059b382d1af0c55202e2d17f2ae065a2cbfec9ee')

options=('!emptydirs')
install=install

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

	./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib \
		--enable-linuxcaps \
		--enable-ntp-signd \

	make
}

package() {
	cd "${srcdir}/${_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 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	install -d -o 87 "${pkgdir}"/var/lib/ntp
	echo > "${pkgdir}/var/lib/ntp/.placeholder"

	install -dm755 "${pkgdir}/usr/lib/systemd/ntp-units.d"
	echo 'ntpd.service' > "${pkgdir}/usr/lib/systemd/ntp-units.d/${pkgname}.list"
}