summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2005-04-27 16:27:40 +0000
committerVolker Stolz <vs@FreeBSD.org>2005-04-27 16:27:40 +0000
commit5cc30f2134e07e3f4570fdc520391d00e0fe6654 (patch)
treeb35219c3951a5fd420cbf07369db8f5d8428a063 /sysutils
parent- update to 2.09 (diff)
Add pcfclock 0.44, userland access to the pcfclock device.
PR: ports/74340 Submitted by: Frank W. Josellis <frank AT dynamical-systems.org>
Notes
Notes: svn path=/head/; revision=134267
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/pcfclock/Makefile29
-rw-r--r--sysutils/pcfclock/distinfo2
-rw-r--r--sysutils/pcfclock/files/patch-pcfdate_pcfdate.c28
-rw-r--r--sysutils/pcfclock/pkg-descr22
-rw-r--r--sysutils/pcfclock/pkg-install7
6 files changed, 89 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index e260db6518a6..7ca511c001a0 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -334,6 +334,7 @@
SUBDIR += p5-Unix-Syslog
SUBDIR += p5-User
SUBDIR += paicc
+ SUBDIR += pcfclock
SUBDIR += pciutils
SUBDIR += pdumpfs
SUBDIR += pdumpfs-clean
diff --git a/sysutils/pcfclock/Makefile b/sysutils/pcfclock/Makefile
new file mode 100644
index 000000000000..cc61a7c49565
--- /dev/null
+++ b/sysutils/pcfclock/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: pcfclock
+# Date created: 23 November 2004
+# Whom: Frank W. Josellis <frank@dynamical-systems.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pcfclock
+PORTVERSION= 0.44
+CATEGORIES= sysutils
+MASTER_SITES= http://www-stud.ims.uni-stuttgart.de/~voegelas/pcfclock/
+
+MAINTAINER= frank@dynamical-systems.org
+COMMENT= Userland access to the pcfclock device
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --without-linux
+
+MAN8= pcfdate.8
+PLIST_FILES= sbin/pcfdate
+
+.include <bsd.port.pre.mk>
+
+post-install:
+.if ${OSVERSION} < 500000
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/pcfclock/distinfo b/sysutils/pcfclock/distinfo
new file mode 100644
index 000000000000..70ba69b70690
--- /dev/null
+++ b/sysutils/pcfclock/distinfo
@@ -0,0 +1,2 @@
+MD5 (pcfclock-0.44.tar.gz) = 35f436caf4e6adb077b72bb49d5af3bb
+SIZE (pcfclock-0.44.tar.gz) = 89914
diff --git a/sysutils/pcfclock/files/patch-pcfdate_pcfdate.c b/sysutils/pcfclock/files/patch-pcfdate_pcfdate.c
new file mode 100644
index 000000000000..eadd62ebc064
--- /dev/null
+++ b/sysutils/pcfclock/files/patch-pcfdate_pcfdate.c
@@ -0,0 +1,28 @@
+--- pcfdate/pcfdate.c.orig Tue Apr 20 07:26:04 2004
++++ pcfdate/pcfdate.c Tue Nov 23 23:16:23 2004
+@@ -162,16 +162,23 @@
+ char buf[256];
+
+ tp = localtime(&newtime);
+- strftime(buf, sizeof(buf), "%c", tp);
+- fprintf(stdout, "%s\n", buf);
++ strftime(buf, sizeof(buf), "%+", tp);
++ fprintf(stdout, "%s", buf);
+ if (verbose) {
++ /*
+ fprintf(stdout, " - DST: \t%s\n", (
+ (timecode[8]&3)==1 ? "Yes" :
+ ((timecode[8]&3)==2 ? "No" : "unknown" ))
+ );
+ fprintf(stdout, " - Sync:\t%s\n", (timecode[1] & 1 ? "Error" : "Ok"));
+ fprintf(stdout, " - Battery:\t%s\n", (timecode[8] & 4 ? "Replace" : "Ok"));
++ */
++ /* Not too verbose: */
++ fprintf(stdout," [Sync: %s, Battery: %s]",
++ (timecode[1] & 1 ? "Error" : "Ok"),
++ (timecode[8] & 4 ? "Replace" : "Ok"));
+ }
++ fprintf(stdout, "\n");
+ }
+
+ return 0;
diff --git a/sysutils/pcfclock/pkg-descr b/sysutils/pcfclock/pkg-descr
new file mode 100644
index 000000000000..a880ce498de0
--- /dev/null
+++ b/sysutils/pcfclock/pkg-descr
@@ -0,0 +1,22 @@
+This port provides the pcfdate utility which reads the time of day from a
+pcfclock device, writes it to stdout or, optionally, sets the system time.
+
+You can benefit from pcfdate in case that
+
+ - your geographic location is in Central Europe within a radius of roughly
+ 1500 km from the DCF77 transmitter near Frankfurt/Main, Germany,
+
+ - you have the Conrad parallel port radio clock attached to your machine,
+
+ - you have the pcfclock device driver enabled in your kernel configuration.
+
+The primary use of pcfdate is to initialize the system time on boot. In its
+normal operation the Conrad clock synchronizes with the transmitter once a
+day, and the time of day displayed refers to its internal quartz clock which,
+however, suffers from a considerable drift. The resulting accumulated error
+can reach about 0.6 sec after 24 hours. Combined with the clockspeed port
+this can still be considered a useful initialization: sntpclock can later be
+used to gradually adjust the system time with the global network time very
+effectively within a few minutes.
+
+WWW: http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html
diff --git a/sysutils/pcfclock/pkg-install b/sysutils/pcfclock/pkg-install
new file mode 100644
index 000000000000..5042c4f80682
--- /dev/null
+++ b/sysutils/pcfclock/pkg-install
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+case $2 in
+ POST-INSTALL)
+ [ -c /dev/pcfclock0 ] || ( cd /dev && ./MAKEDEV pcfclock0 )
+ ;;
+esac