summaryrefslogtreecommitdiff
path: root/user/uptimed
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2019-01-06 15:17:44 -0600
committerKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2019-01-06 15:17:44 -0600
commit1d5501c950772da7e15998ea557f7032439e55a2 (patch)
tree6b34c6a2b9c1d10512265e128b0d7e74629b77f6 /user/uptimed
parent6c9721136977ab20ddc576bc400eab4067391dcb (diff)
downloadpackages-1d5501c950772da7e15998ea557f7032439e55a2.tar.gz
packages-1d5501c950772da7e15998ea557f7032439e55a2.tar.bz2
packages-1d5501c950772da7e15998ea557f7032439e55a2.tar.xz
packages-1d5501c950772da7e15998ea557f7032439e55a2.zip
user/uptimed: new package
Diffstat (limited to 'user/uptimed')
-rw-r--r--user/uptimed/APKBUILD39
-rw-r--r--user/uptimed/uptimed.init12
2 files changed, 51 insertions, 0 deletions
diff --git a/user/uptimed/APKBUILD b/user/uptimed/APKBUILD
new file mode 100644
index 000000000..ace7b6884
--- /dev/null
+++ b/user/uptimed/APKBUILD
@@ -0,0 +1,39 @@
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=uptimed
+pkgver=0.4.1
+pkgrel=0
+pkgdesc='System uptime record daemon'
+arch="all"
+options="!check" # No tests
+url="https://github.com/rpodgorny/uptimed"
+license="GPL-2.0-only"
+subpackages="$pkgname-doc $pkgname-openrc"
+makedepends="autoconf automake libtool"
+source="$pkgname-$pkgver.tar.gz::https://github.com/rpodgorny/uptimed/archive/v$pkgver.tar.gz
+ uptimed.init"
+
+build() {
+ cd "$builddir"
+ autoreconf -vif
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "$builddir"
+ make install DESTDIR="$pkgdir"
+ mv "$pkgdir"/etc/uptimed.conf-dist \
+ "$pkgdir"/etc/uptimed.conf
+ install -Dm755 "$srcdir"/uptimed.init \
+ "$pkgdir"/etc/init.d/uptimed
+}
+
+sha512sums="5dfe79aebab8c8daca3a3ec88d54e312446fc7cf8b54ef1414cbfcb3fb25053ef31235de4b42cb14fc7352965b77ca2875c753b97b4d61178792a5484715e23a uptimed-0.4.1.tar.gz
+0884e9f5ace5a69b8eea4401c7f3b84f0a434f0ceb2b920919e83f318eb9e54182932de174cf1666ddddbab84c146781f3dd78571e80cc274963a72bf4f53a6b uptimed.init"
diff --git a/user/uptimed/uptimed.init b/user/uptimed/uptimed.init
new file mode 100644
index 000000000..deba54128
--- /dev/null
+++ b/user/uptimed/uptimed.init
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="uptimed - a daemon to record uptime records"
+pidfile="/var/run/uptimed/uptimed.pid"
+command="/usr/sbin/uptimed"
+command_args="-p ${pidfile}"
+
+start_pre() {
+ uptimed -b
+}