aboutsummaryrefslogtreecommitdiffstats
path: root/ntp/PKGBUILD
blob: b8ca496558763f2cb25e6887f2274eacc9d666a3 (plain) (blame)
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
62
#Maintainer: Zee Eichel  <zee@dracos-linux.org>

pkgname=ntp
pkgver=4.2.8
pkgrel=1
pkgdesc="Time synchronized Utilities"
arch=('x86_64')
url="https://www.eecis.udel.edu/~ntp/"
license=('GPL')
depends=("io-socket-ssl-pl")
source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p12.tar.gz")
sha256sums=("709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454")

prepare() {
cd "$pkgname"-4.2.8p12
sed -e 's/"(\\S+)"/"?([^\\s"]+)"?/' \
    -i scripts/update-leap/update-leap.in
}

build() {
	cd "$pkgname"-4.2.8p12
  ./configure CFLAGS="-O2 -g -fPIC" \
            --prefix=/usr         \
            --bindir=/usr/sbin    \
            --sysconfdir=/etc     \
            --enable-linuxcaps    \
            --with-lineeditlibs=readline \
            --docdir=/usr/share/doc/ntp-4.2.8p12 &&
make
}

package() {
	cd "$pkgname"-4.2.8p12
	make  DESTDIR="${pkgdir}" install
  install -v -d $pkgdir/etc
  rm -rf $pkgdir/usr/share/{doc,man}

install=ntp.install
#config file

cat > $pkgdir/etc/ntp.conf << "EOF"
# Asia
server 0.asia.pool.ntp.org

# Australia
server 0.oceania.pool.ntp.org

# Europe
server 0.europe.pool.ntp.org

# North America
server 0.north-america.pool.ntp.org

# South America
server 2.south-america.pool.ntp.org

driftfile /var/lib/ntp/ntp.drift
pidfile   /var/run/ntpd.pid

leapfile  /etc/ntp.leapseconds
EOF
}