summaryrefslogtreecommitdiff
path: root/net-misc/openrdate
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/openrdate
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/openrdate')
-rw-r--r--net-misc/openrdate/Manifest8
-rw-r--r--net-misc/openrdate/files/openrdate-1.1.3-rename.patch29
-rw-r--r--net-misc/openrdate/files/openrdate-confd12
-rw-r--r--net-misc/openrdate/files/openrdate-initd26
-rw-r--r--net-misc/openrdate/metadata.xml10
-rw-r--r--net-misc/openrdate/openrdate-1.2.ebuild32
6 files changed, 117 insertions, 0 deletions
diff --git a/net-misc/openrdate/Manifest b/net-misc/openrdate/Manifest
new file mode 100644
index 000000000000..dc9d0f71c1de
--- /dev/null
+++ b/net-misc/openrdate/Manifest
@@ -0,0 +1,8 @@
+AUX openrdate-1.1.3-rename.patch 670 SHA256 4e3647ca891ff78a4f1ef479ff330684589167a29a53a95dd6a2a1fcf8ee12bf SHA512 5f370bd4b053fb822e946fd3fadd797a4f13ce6bb3f2b47085060e7262a35d453b5562ccae68818ca061f7842d462d62a30fa5d926cc67ddc5fb7332c23415cd WHIRLPOOL d7acfe6a28262d422783a7d01bfa5b09cf32912898e7b4bba274b1dc63c1eef117128da423ad4339a7483272c730aeab86af9a48f2c8d4910c7473a0a0290106
+AUX openrdate-confd 467 SHA256 c33efc58d4fe169a43fbbc05b92bedb88eac0420906161e86d7dd58790ee43d5 SHA512 eb215a4a4c6dbf94525c0415027210aa9fc2b3e7e45570054c1b1daeb1e9774a3905cbe5fadb792d6c5cb0c6e90a9e2beff05d73ff479dde5fd1eefd42997036 WHIRLPOOL d9f7696917e2f7559b538e45015ea020a5f8625033bb6844744cbe16094e89396883c7c0aa49a0b649b90b9df8c5e88b3c200bd364a77482fdc8a0b69dec4c7f
+AUX openrdate-initd 535 SHA256 df4374beb405d51d06afeaf6d0ddd22c1982568a43d0c6c71d913199d66da8da SHA512 f7303c873773ae453c7e7c2bc31dacb629a76496b0901554afa0159778dc2bb9b34daac5ed2a269fa57fffec5a969dd88749e566f0745c7d5289317ce81417c1 WHIRLPOOL 56b9095231e9d585aa330d6ee1d162c4a7d3b008310442db405dddf72bd5a6c809fa49b27a79eb6bcb8809f5ccb2608444170896f8a7fec1416d2354d1a8efc8
+DIST openrdate-1.2.tar.gz 118030 SHA256 2921fc96d4ca676190d6ffd45fa80e107c1fe12291c0c4f64827c29639863332 SHA512 5469352c26883863442641b47cc76512590af1524ecaa51fb829ae027d413889626b5b8098de0bea177a3c0ac411986518380e9400f20ddd3d4ac0bffb042e11 WHIRLPOOL 34eaa46d049c5661152d0dcc67e1aac44a6283ec267e08eb088d7716a9cb1a65477b7b538957aef625407ed642bf9c67333883bae238376ae95cee063311658c
+EBUILD openrdate-1.2.ebuild 729 SHA256 c8469279b82bcbebcd91776f4d103c0a590b68c3c7c2123bbbf2a54e10d1b0ca SHA512 22246441052c8a14564594c9b5a43f4d7b34521e0b71587284d6e5e53cc8a666c324bea31cbc152561223a22ee50496b381c3c59c0cb139d8b44e66bbb34bef7 WHIRLPOOL fe0106e13e5a15dc222339c6a1798fda5213fb8d551f756b800b70c8c06b81a25bf25bd4e9c6ed6b5c1d43facc8dfa21b235b80400343b6442e3a245c2533fd0
+MISC ChangeLog 2509 SHA256 211907078d7bcb08f329f289012a88e5deb74018ea339f76898e8f108481baf1 SHA512 52dcd0183e2295542843e16d4aa45d870fae78086200f13026ad5e52b420e85cdaf8090a78f5712fa6e769e1275c145ba0a51b20070f505265a85138376dd46b WHIRLPOOL 6b666f1a9b0ad9f73bd13a38ffa91bb34d59e378ce7df9ea1f956ccdd8aeaaa9b8775fee210673e951247ea276a577832fca70af00754a38ff1cb313d7003e29
+MISC ChangeLog-2015 1396 SHA256 e52ddbda8bbfc3948ab642b439bb99c93826694c9386bc86cd1f21e47f32a6f6 SHA512 e7e50a722e476fd5c8006f6e5280d94aecdca7984f623fee8bffb99205bdb1971cdf45c4f0bcb2062ec76a4c82d80b9af421f8658c54c8f24902567b2f595e13 WHIRLPOOL 85759dd0bb4844a325ad55eb4e605dc1fe2475f42d5e776c01ccf59f6ca7dcc5f700f31d402fc68850523f17e0971b9157043e9a222076a9985bd80f1e64109c
+MISC metadata.xml 305 SHA256 10d7409c55173c6cf42d65076e27a9dc674ad00372579a33fce582e5c001267d SHA512 1453b01adcb9b82c01603d34703eaa816164e3132dd542cb4f338c8a07e5efbb4f23bd16e634dc90f0b89b8441bbe94af64d36bc1ba182907e6058a558f5bb70 WHIRLPOOL f25a5558ed96d4bfe474b9831070779943c75e154f838ca9ceb0658a8443c5e4e72b6d8ff899668366f2ef0e63ee5985be234cf96454cbf6a344588b45799182
diff --git a/net-misc/openrdate/files/openrdate-1.1.3-rename.patch b/net-misc/openrdate/files/openrdate-1.1.3-rename.patch
new file mode 100644
index 000000000000..5f4774c3be4e
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-1.1.3-rename.patch
@@ -0,0 +1,29 @@
+Name the binary 'openrdate' as so not to conflict with the pre-existing ancient
+rdate.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar openrdate-1.1.3.orig/Makefile.am openrdate-1.1.3/Makefile.am
+--- openrdate-1.1.3.orig/Makefile.am 2007-11-10 21:15:31.000000000 -0800
++++ openrdate-1.1.3/Makefile.am 2008-06-18 14:27:40.001963783 -0700
+@@ -1,15 +1,15 @@
+ SUBDIRS = src
+
+-bin_PROGRAMS = rdate
++bin_PROGRAMS = openrdate
+
+-rdate_SOURCES= \
++openrdate_SOURCES= \
+ src/rdate.c
+
+-rdate_LDADD= \
++openrdate_LDADD= \
+ src/librdate.a
+
+ man_MANS= \
+- docs/rdate.8
++ docs/openrdate.8
+
+ EXTRA_DIST= \
+- docs/rdate.8
++ $(man_MANS)
diff --git a/net-misc/openrdate/files/openrdate-confd b/net-misc/openrdate/files/openrdate-confd
new file mode 100644
index 000000000000..fb4ee4caa746
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-confd
@@ -0,0 +1,12 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# the NTP or RFC868/time server to get the date from
+RDATE_SERVER="pool.ntp.org"
+
+# Options to pass to rdate
+# "-s" is mandatory to set the system time, and
+# is passed regardless of this variable.
+# "-n" says that we are using an NTP server instead of a RFC868/time server.
+# "-c" is for leap seconds, which is needed on NTP servers.
+OPENRDATE_OPTS="-n -c"
diff --git a/net-misc/openrdate/files/openrdate-initd b/net-misc/openrdate/files/openrdate-initd
new file mode 100644
index 000000000000..92210cce3c89
--- /dev/null
+++ b/net-misc/openrdate/files/openrdate-initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ before cron
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ -z "${RDATE_SERVER}" ] ; then
+ eerror "Please edit /etc/conf.d/openrdate"
+ eerror "I need to know what server to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via openrdate"
+ /usr/bin/openrdate -s ${OPENRDATE_OPTS} ${RDATE_SERVER} > /dev/null
+ eend $? "Failed to set clock via openrdate"
+}
diff --git a/net-misc/openrdate/metadata.xml b/net-misc/openrdate/metadata.xml
new file mode 100644
index 000000000000..bbbc68551751
--- /dev/null
+++ b/net-misc/openrdate/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">openrdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/openrdate/openrdate-1.2.ebuild b/net-misc/openrdate/openrdate-1.2.ebuild
new file mode 100644
index 000000000000..eccde40413fa
--- /dev/null
+++ b/net-misc/openrdate/openrdate-1.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+WANT_AUTOMAKE=1.9
+
+inherit autotools eutils
+
+DESCRIPTION="use TCP or UDP to retrieve the current time of another machine"
+HOMEPAGE="https://sourceforge.net/projects/openrdate/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.1.3-rename.patch
+ eautomake
+ mv docs/{,open}rdate.8
+}
+
+src_install(){
+ emake -j1 DESTDIR="${D}" install || die "make install failed"
+ newinitd "${FILESDIR}"/openrdate-initd openrdate
+ newconfd "${FILESDIR}"/openrdate-confd openrdate
+}