summaryrefslogtreecommitdiff
path: root/extra/ntp/PKGBUILD
blob: b710e7d663c0075c83b77e0e98815a7b68f727fe (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
57
58
59
60
61
# $Id: PKGBUILD 143934 2011-11-30 21:30:13Z andrea $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: kevin <kevin@archlinux.org>

pkgname=ntp
pkgver=4.2.6.p4
_realver=4.2.6p4
pkgrel=2
pkgdesc='Network Time Protocol reference implementation'
url='http://www.ntp.org/'
license=('custom')
arch=('i686' 'x86_64' 'mips64el')
depends=('openssl' 'readline' 'libcap')
makedepends=('perl-html-parser')
backup=('etc/ntp.conf' 'etc/conf.d/ntpd.conf')
source=("http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-${_realver}.tar.gz"
        'ntpd'
        'ntpdate'
        'ntp.conf'
        'ntpd.conf')
sha1sums=('b53c4565c5d1c37494584d4fb826f82ffea285cf'
          '97b41b8bc34f259f4e525ab2e58707c9724e72e2'
          '63572457586379aa6bf75b6e899e71d651e643f4'
          'f6fa4838a33a3abcdd168a37b3f4a2dddd60472e'
          '6cfcb7bbd34499b30e31dffca2f3e1a036010271')

install=install

build() {
	cd "${srcdir}/${pkgname}-${_realver}"

	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--enable-linux-caps \

	make
}

package() {
	cd "${srcdir}/${pkgname}-$_realver"

	make DESTDIR="${pkgdir}" install

	install -Dm755 ../ntpd "${pkgdir}"/etc/rc.d/ntpd
	install -Dm755 ../ntpdate "${pkgdir}"/etc/rc.d/ntpdate
	install -Dm644 ../ntp.conf "${pkgdir}"/etc/ntp.conf
	install -Dm644 ../ntpd.conf "${pkgdir}"/etc/conf.d/ntpd.conf

	cd html
	../scripts/html2man
	install -d "${pkgdir}"/usr/share/man
	mv man/man* "${pkgdir}"/usr/share/man
	mv "${pkgdir}/usr/share/man/man8/ntpd.8" "${pkgdir}/usr/share/man/man8/ntp-ntpd.8" # we should ditch openntpd
	cd ..

	rmdir "${pkgdir}"/usr/{lib,sbin}
	install -d "${pkgdir}/var/lib/ntp"
	install -Dm644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	touch "${pkgdir}"/var/lib/ntp/.placeholder
}