diff options
author | Martin Väth <martin@mvath.de> | 2016-09-02 20:19:54 +0200 |
---|---|---|
committer | Martin Väth <martin@mvath.de> | 2016-09-02 20:19:54 +0200 |
commit | 0d2f7363f9aa58953bc73243050aa0e762d92db6 (patch) | |
tree | aafd3630597caee5d62e1842bf9772d08d2b40ea /net-misc/openrdate | |
parent | x11-libs/motif: Copy from gentoo repository to dump dev-util/byacc dep (diff) | |
download | mv-0d2f7363f9aa58953bc73243050aa0e762d92db6.tar.gz mv-0d2f7363f9aa58953bc73243050aa0e762d92db6.tar.bz2 mv-0d2f7363f9aa58953bc73243050aa0e762d92db6.zip |
net-misc/openrdate: Copy from gentoo repository to fix WANT_AUTOMAKE
Diffstat (limited to 'net-misc/openrdate')
-rw-r--r-- | net-misc/openrdate/Manifest | 1 | ||||
-rw-r--r-- | net-misc/openrdate/files/openrdate-1.1.3-rename.patch | 29 | ||||
-rw-r--r-- | net-misc/openrdate/files/openrdate-confd | 12 | ||||
-rw-r--r-- | net-misc/openrdate/files/openrdate-initd | 26 | ||||
-rw-r--r-- | net-misc/openrdate/metadata.xml | 10 | ||||
-rw-r--r-- | net-misc/openrdate/openrdate-1.2.ebuild | 30 |
6 files changed, 108 insertions, 0 deletions
diff --git a/net-misc/openrdate/Manifest b/net-misc/openrdate/Manifest new file mode 100644 index 00000000..d79aaccd --- /dev/null +++ b/net-misc/openrdate/Manifest @@ -0,0 +1 @@ +DIST openrdate-1.2.tar.gz 118030 SHA256 2921fc96d4ca676190d6ffd45fa80e107c1fe12291c0c4f64827c29639863332 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 00000000..5f4774c3 --- /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 00000000..a85af6e6 --- /dev/null +++ b/net-misc/openrdate/files/openrdate-confd @@ -0,0 +1,12 @@ +# Copyright 2012 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 00000000..911da989 --- /dev/null +++ b/net-misc/openrdate/files/openrdate-initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 2012 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 00000000..bbbc6855 --- /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 00000000..c70a5e6c --- /dev/null +++ b/net-misc/openrdate/openrdate-1.2.ebuild @@ -0,0 +1,30 @@ +# Copyright 2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools + +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_prepare() { + eapply "${FILESDIR}"/${PN}-1.1.3-rename.patch + eapply_user + 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 +} |