svn commit: r400493 - in head/sysutils: . tuptime tuptime/files
Alexey Dokuchaev
danfe at FreeBSD.org
Fri Oct 30 08:35:58 UTC 2015
Author: danfe
Date: Fri Oct 30 08:35:56 2015
New Revision: 400493
URL: https://svnweb.freebsd.org/changeset/ports/400493
Log:
Add a port of tuptime, historical and statistical system running time report
tool like uptime(1) command but with more interesting output.
PR: 203079
Submitted by: Jeremy Johnston
Added:
head/sysutils/tuptime/
head/sysutils/tuptime/Makefile (contents, props changed)
head/sysutils/tuptime/distinfo (contents, props changed)
head/sysutils/tuptime/files/
head/sysutils/tuptime/files/pkg-message.in (contents, props changed)
head/sysutils/tuptime/files/tuptime.in (contents, props changed)
head/sysutils/tuptime/pkg-descr (contents, props changed)
Modified:
head/sysutils/Makefile
Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile Fri Oct 30 07:08:19 2015 (r400492)
+++ head/sysutils/Makefile Fri Oct 30 08:35:56 2015 (r400493)
@@ -1027,6 +1027,7 @@
SUBDIR += tss
SUBDIR += tty-clock
SUBDIR += ttyload
+ SUBDIR += tuptime
SUBDIR += tw_cli
SUBDIR += tzdialog
SUBDIR += u-boot-bananapi
Added: head/sysutils/tuptime/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/tuptime/Makefile Fri Oct 30 08:35:56 2015 (r400493)
@@ -0,0 +1,32 @@
+# Created by: Jeremy Johnston <jeremy at smart-serv.net>
+# $FreeBSD$
+
+PORTNAME= tuptime
+DISTVERSIONPREFIX= v
+DISTVERSION= 3.2.01
+CATEGORIES= sysutils
+
+MAINTAINER= jeremy at smart-serv.net
+COMMENT= Historical and statistical system running time report tool
+
+LICENSE= GPLv2
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=2.7:${PORTSDIR}/databases/py-sqlite3
+
+USES= python shebangfix
+
+USE_GITHUB= yes
+GH_ACCOUNT= rfrail3
+
+NO_BUILD= yes
+USE_RC_SUBR= ${PORTNAME}
+
+SHEBANG_FILES= latest/tuptime
+SUB_FILES= pkg-message
+
+PLIST_FILES= bin/tuptime
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/latest/tuptime ${STAGEDIR}${PREFIX}/bin
+
+.include <bsd.port.mk>
Added: head/sysutils/tuptime/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/tuptime/distinfo Fri Oct 30 08:35:56 2015 (r400493)
@@ -0,0 +1,2 @@
+SHA256 (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 330fbb7f9163fd1ec1c139a3e7652f86ddd2987f3e94e3b481f1a3f3e3da64c2
+SIZE (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 51114
Added: head/sysutils/tuptime/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/tuptime/files/pkg-message.in Fri Oct 30 08:35:56 2015 (r400493)
@@ -0,0 +1,18 @@
+======================================================================
+
+tuptime requires linprocfs(5) mounted under /compat/linux/proc.
+
+If you have not done it yet, please do the following:
+
+ mkdir -p /usr/compat/linux/proc; ln -sf usr/compat /compat
+ mount -t linprocfs linprocfs /compat/linux/proc
+
+To make it permanent, you need the following lines in /etc/fstab:
+
+ linproc /compat/linux/proc linprocfs rw,late 0 0
+
+tuptime also requires the following be added to /etc/crontab:
+
+ */5 * * * * root test -x %%PREFIX%%/bin/tuptime && %%PREFIX%%/bin/tuptime -x > /dev/null
+
+======================================================================
Added: head/sysutils/tuptime/files/tuptime.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/tuptime/files/tuptime.in Fri Oct 30 08:35:56 2015 (r400493)
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: tuptime
+# KEYWORD: nojail shutdown
+
+. /etc/rc.subr
+
+name="tuptime"
+rcvar=tuptime_enable
+
+command="%%PREFIX%%/bin/tuptime"
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+
+tuptime_start()
+{
+ command_args="-x"
+
+ $command $command_args
+}
+
+tuptime_stop()
+{
+ command_args="-xg"
+
+ $command $command_args
+}
+
+load_rc_config $name
+run_rc_command "$1"
Added: head/sysutils/tuptime/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/tuptime/pkg-descr Fri Oct 30 08:35:56 2015 (r400493)
@@ -0,0 +1,5 @@
+Tuptime is a tool that reports historical and statistical running time of
+the system, keeping it between restarts. Like uptime(1) command but with
+more interesting output.
+
+WWW: https://github.com/rfrail3/tuptime
More information about the svn-ports-head
mailing list