summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2015-06-13 17:59:22 +0200
committerMuflone2015-06-13 17:59:22 +0200
commitd2a08095d21f909e19f4f9c350eac97ccfb8022a (patch)
treeedd08c04a2476b6d7588b701ba09453f554cae37
downloadaur-d2a08095d21f909e19f4f9c350eac97ccfb8022a.tar.gz
Initial import
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD55
-rw-r--r--ntpdate.conf11
-rw-r--r--ntpdate.service12
-rw-r--r--restore-html2man.patch39
5 files changed, 141 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a82ada1844f3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = ntpdate
+ pkgdesc = Client for the Network Time Protocol (NTP)
+ pkgver = 4.2.8.p1
+ pkgrel = 1
+ url = http://www.ntp.org/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = perl-html-parser
+ depends = openssl
+ conflicts = ntp
+ conflicts = ntpdate-dev
+ backup = etc/conf.d/ntpdate.conf
+ source = http://archive.ntp.org/ntp4/ntp-4.2.8p1.tar.gz
+ source = ntpdate.conf
+ source = ntpdate.service
+ source = restore-html2man.patch
+ sha256sums = 948274b88f1ed002d867ced6aaefdfd0999668b11285ac2b3a67ff2629d59d88
+ sha256sums = 1ddbf0f51e030c6ec48d50e1b0eb6682f2d51567fbbb8fdd695a0e38a6036fd7
+ sha256sums = 2267e19120de4a73703ed0d83a4a0088309600ce3fed88c3c17a950fa0c1aa85
+ sha256sums = 59571e06242a224c7cacaec7395b7fd25078ab469abb035ea0eb6fbecab8fd65
+
+pkgname = ntpdate
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e1c6e1556620
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>
+
+pkgname=ntpdate
+_pkgname=ntp
+_pkgver=4.2.8p1
+pkgver=${_pkgver/p/.p}
+pkgrel=1
+pkgdesc='Client for the Network Time Protocol (NTP)'
+url='http://www.ntp.org/'
+license=('custom')
+arch=('i686' 'x86_64')
+makedepends=('perl-html-parser')
+depends=('openssl')
+conflicts=('ntp' 'ntpdate-dev')
+backup=('etc/conf.d/ntpdate.conf')
+source=("http://archive.ntp.org/ntp4/${_pkgname}-${_pkgver}.tar.gz"
+ "${pkgname}.conf"
+ "${pkgname}.service"
+ "restore-html2man.patch")
+sha256sums=('948274b88f1ed002d867ced6aaefdfd0999668b11285ac2b3a67ff2629d59d88'
+ '1ddbf0f51e030c6ec48d50e1b0eb6682f2d51567fbbb8fdd695a0e38a6036fd7'
+ '2267e19120de4a73703ed0d83a4a0088309600ce3fed88c3c17a950fa0c1aa85'
+ '59571e06242a224c7cacaec7395b7fd25078ab469abb035ea0eb6fbecab8fd65')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${_pkgver}"
+ patch -p1 -i "../restore-html2man.patch"
+ cp -f "scripts/deprecated/html2man.in" "scripts/"
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${_pkgver}"
+ ./configure --prefix=/usr --libexecdir=/usr/lib
+ make
+ # Convert the html page to man page
+ cd "html"
+ "../scripts/html2man"
+}
+
+package() {
+ install -m 755 -d "${pkgdir}/etc/conf.d"
+ install -m 644 -t "${pkgdir}/etc/conf.d" "${pkgname}.conf"
+ install -m 755 -d "${pkgdir}/usr/lib/systemd/system"
+ install -m 644 -t "${pkgdir}/usr/lib/systemd/system" "${pkgname}.service"
+
+ cd "${srcdir}/${_pkgname}-${_pkgver}"
+ install -m 755 -d "${pkgdir}/usr/bin"
+ install -m 755 -t "${pkgdir}/usr/bin" "${pkgname}/${pkgname}"
+ install -m 755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "COPYRIGHT"
+ install -m 755 -d "${pkgdir}/usr/share/man/man1"
+ install -m 644 -t "${pkgdir}/usr/share/man/man1" "html/man/man1/ntpdate.1"
+}
+
diff --git a/ntpdate.conf b/ntpdate.conf
new file mode 100644
index 000000000000..201696492398
--- /dev/null
+++ b/ntpdate.conf
@@ -0,0 +1,11 @@
+# change this to a server closer to your location
+NTP_CLIENT_SERVER="pool.ntp.org"
+
+# client options
+NTP_CLIENT_OPTION="-b -u"
+
+# timeout for the ntp-client
+NTPCLIENT_TIMEOUT=10
+
+# delay before to start the service
+NTP_CLIENT_DELAY=60
diff --git a/ntpdate.service b/ntpdate.service
new file mode 100644
index 000000000000..14b854b202b7
--- /dev/null
+++ b/ntpdate.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Update system time using NTP
+After=network.target nss-lookup.target
+
+[Service]
+Type=oneshot
+EnvironmentFile=/etc/conf.d/ntpdate.conf
+ExecStartPre=/usr/bin/sleep $NTP_CLIENT_DELAY
+ExecStart=/usr/bin/ntpdate $NTP_CLIENT_OPTION -t $NTPCLIENT_TIMEOUT $NTP_CLIENT_SERVER
+
+[Install]
+WantedBy=multi-user.target
diff --git a/restore-html2man.patch b/restore-html2man.patch
new file mode 100644
index 000000000000..cdf3070573f9
--- /dev/null
+++ b/restore-html2man.patch
@@ -0,0 +1,39 @@
+diff -Naur ntp-dev-4.2.7p444.orig/configure ntp-dev-4.2.7p444/configure
+--- ntp-dev-4.2.7p444.orig/configure 2014-05-19 11:24:45.000000000 +0200
++++ ntp-dev-4.2.7p444/configure 2014-06-08 15:35:06.854519261 +0200
+@@ -35946,6 +35946,8 @@
+
+ ac_config_files="$ac_config_files scripts/summary"
+
++ac_config_files="$ac_config_files scripts/html2man"
++
+ ac_config_files="$ac_config_files scripts/build/Makefile"
+
+ ac_config_files="$ac_config_files tests/Makefile"
+@@ -37184,6 +37186,7 @@
+ "scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
+ "scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
+ "scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
++ "scripts/html2man") CONFIG_FILES="$CONFIG_FILES scripts/html2man" ;;
+ "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
+@@ -38730,6 +38733,7 @@
+ "scripts/ntpver":F) chmod +x scripts/ntpver ;;
+ "scripts/plot_summary":F) chmod +x scripts/plot_summary ;;
+ "scripts/summary":F) chmod +x scripts/summary ;;
++ "scripts/html2man":F) chmod +x scripts/html2man ;;
+
+ esac
+ done # for ac_tag
+diff -Naur ntp-dev-4.2.7p444.orig/scripts/deprecated/html2man.in ntp-dev-4.2.7p444/scripts/deprecated/html2man.in
+--- ntp-dev-4.2.7p444.orig/scripts/deprecated/html2man.in 2013-12-21 12:12:06.000000000 +0100
++++ ntp-dev-4.2.7p444/scripts/deprecated/html2man.in 2014-06-08 15:35:38.591185697 +0200
+@@ -51,6 +51,7 @@
+ mkdir $MANDIR, 0777;
+ mkdir "$MANDIR/man8", 0777;
+ mkdir "$MANDIR/man5", 0777;
++mkdir "$MANDIR/man1", 0777;
+
+ # Do the actual processing
+ foreach $file (keys %manfiles) {