aboutsummaryrefslogtreecommitdiffstats
path: root/ntp/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'ntp/PKGBUILD')
-rw-r--r--ntp/PKGBUILD62
1 files changed, 62 insertions, 0 deletions
diff --git a/ntp/PKGBUILD b/ntp/PKGBUILD
new file mode 100644
index 0000000..b8ca496
--- /dev/null
+++ b/ntp/PKGBUILD
@@ -0,0 +1,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
+}