aboutsummaryrefslogtreecommitdiff
path: root/sysutils/tuptime
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2015-10-30 08:35:56 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2015-10-30 08:35:56 +0000
commit94c76f99d248f16d0df57078c45070248883755c (patch)
tree66def5defb0505ea6083e527671e262f61c642cb /sysutils/tuptime
parent2c0d50dd9a2c7c04832165483496b45e7f8e3fa8 (diff)
downloadports-94c76f99d248f16d0df57078c45070248883755c.tar.gz
ports-94c76f99d248f16d0df57078c45070248883755c.zip
Notes
Diffstat (limited to 'sysutils/tuptime')
-rw-r--r--sysutils/tuptime/Makefile32
-rw-r--r--sysutils/tuptime/distinfo2
-rw-r--r--sysutils/tuptime/files/pkg-message.in18
-rw-r--r--sysutils/tuptime/files/tuptime.in33
-rw-r--r--sysutils/tuptime/pkg-descr5
5 files changed, 90 insertions, 0 deletions
diff --git a/sysutils/tuptime/Makefile b/sysutils/tuptime/Makefile
new file mode 100644
index 000000000000..3d893ef92593
--- /dev/null
+++ b/sysutils/tuptime/Makefile
@@ -0,0 +1,32 @@
+# Created by: Jeremy Johnston <jeremy@smart-serv.net>
+# $FreeBSD$
+
+PORTNAME= tuptime
+DISTVERSIONPREFIX= v
+DISTVERSION= 3.2.01
+CATEGORIES= sysutils
+
+MAINTAINER= jeremy@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>
diff --git a/sysutils/tuptime/distinfo b/sysutils/tuptime/distinfo
new file mode 100644
index 000000000000..e55ed7ca778e
--- /dev/null
+++ b/sysutils/tuptime/distinfo
@@ -0,0 +1,2 @@
+SHA256 (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 330fbb7f9163fd1ec1c139a3e7652f86ddd2987f3e94e3b481f1a3f3e3da64c2
+SIZE (rfrail3-tuptime-v3.2.01_GH0.tar.gz) = 51114
diff --git a/sysutils/tuptime/files/pkg-message.in b/sysutils/tuptime/files/pkg-message.in
new file mode 100644
index 000000000000..f15a60a6da75
--- /dev/null
+++ b/sysutils/tuptime/files/pkg-message.in
@@ -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
+
+======================================================================
diff --git a/sysutils/tuptime/files/tuptime.in b/sysutils/tuptime/files/tuptime.in
new file mode 100644
index 000000000000..c41ee49a0b35
--- /dev/null
+++ b/sysutils/tuptime/files/tuptime.in
@@ -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"
diff --git a/sysutils/tuptime/pkg-descr b/sysutils/tuptime/pkg-descr
new file mode 100644
index 000000000000..88f9c771cfae
--- /dev/null
+++ b/sysutils/tuptime/pkg-descr
@@ -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