summaryrefslogtreecommitdiff
path: root/sysutils/pcfclock
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-05-01 05:45:47 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-05-01 05:45:47 +0000
commit5fc4fae1e78bbf27d78c2b7f480f3a43541cd359 (patch)
tree833db8ddf336ae57c4a2c0bce7c9e8021365c0a0 /sysutils/pcfclock
parentdpkg installs an 'install-info' command which conflicts with one in the (diff)
- Use new rc.d script
- Bump PORTREVISION - portlint(1) PR: 86839 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=161008
Diffstat (limited to 'sysutils/pcfclock')
-rw-r--r--sysutils/pcfclock/Makefile14
-rw-r--r--sysutils/pcfclock/files/pcfdate.in31
-rw-r--r--sysutils/pcfclock/pkg-install17
3 files changed, 49 insertions, 13 deletions
diff --git a/sysutils/pcfclock/Makefile b/sysutils/pcfclock/Makefile
index 8b6ebff235cd..be7283909c74 100644
--- a/sysutils/pcfclock/Makefile
+++ b/sysutils/pcfclock/Makefile
@@ -7,13 +7,15 @@
PORTNAME= pcfclock
PORTVERSION= 0.44
-PORTREVISION= 1
+PORTREVISION= 2
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
+USE_RC_SUBR= pcfdate
+
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --without-linux
@@ -22,17 +24,15 @@ PLIST_FILES= sbin/pcfdate
.include <bsd.port.pre.mk>
-.if ${ARCH} == "alpha"
-IGNORE= Not supported for architecture ${ARCH}
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+IGNORE= not supported for architecture ${ARCH}
.endif
.if ${OSVERSION} < 400000
-IGNORE= Not supported for versions prior to FreeBSD 4.0
+IGNORE= not supported for versions prior to FreeBSD 4.0
.endif
post-install:
-.if ${OSVERSION} < 500000
- ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/sysutils/pcfclock/files/pcfdate.in b/sysutils/pcfclock/files/pcfdate.in
new file mode 100644
index 000000000000..c019a6d57c22
--- /dev/null
+++ b/sysutils/pcfclock/files/pcfdate.in
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: pcfdate
+# BEFORE: SERVERS
+# KEYWORD: FreeBSD
+#
+# Define these pcfdate_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/pcfdate
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+
+. %%RC_SUBR%%
+
+name="pcfdate"
+rcvar=${name}_enable
+
+load_rc_config $name
+
+: ${pcfdate_enable="NO"} # Enable pcfdate
+: ${pcfdate_flags="-sv"} # Flags to pcfdate program
+
+command="%%PREFIX%%/sbin/pcfdate"
+required_files="/dev/pcfclock0"
+stop_cmd=":"
+
+run_rc_command "$1"
diff --git a/sysutils/pcfclock/pkg-install b/sysutils/pcfclock/pkg-install
index c9dee1bc1ddd..45607a185994 100644
--- a/sysutils/pcfclock/pkg-install
+++ b/sysutils/pcfclock/pkg-install
@@ -3,18 +3,23 @@
case $2 in
POST-INSTALL)
if [ ! -c /dev/pcfclock0 ]; then
- rv=1
if [ -x /dev/MAKEDEV ]; then
+ # FreeBSD 4.x
( cd /dev && ./MAKEDEV pcfclock0 )
rv=$?
- fi
- if [ ${rv} = 0 ]; then
- echo "$2: Device special file /dev/pcfclock0 created"
+ if [ ${rv} = 0 ]; then
+ echo "$2: Device special file /dev/pcfclock0 created"
+ else
+ echo "$2: Unexpected failure creating /dev/pcfclock0"
+ echo "$2: Try 'cd /dev ; mknod pcfclock0 c 140 0 root:wheel'"
+ fi
else
- echo "$2: Unexpected failure creating /dev/pcfclock0"
- echo "$2: Try 'cd /dev ; mknod pcfclock0 c 140 0 root:wheel'"
+ # FreeBSD 5.x or later
+ echo "$2: No pcfclock device found"
+ echo "$2: Ensure to have pcfclock support enabled for your kernel"
fi
fi
+
;;
esac