summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-23 14:48:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-24 09:43:33 +0000
commitccefd232a50697581ac0e1edea5a9041b47d9765 (patch)
tree2e91fd8aca56edac1539ad3af3927abfe3358a1b
parent2e1f43938501d474ee0b5480eb92c9fc1ad0dd41 (diff)
downloadaports-ccefd232a50697581ac0e1edea5a9041b47d9765.tar.bz2
aports-ccefd232a50697581ac0e1edea5a9041b47d9765.tar.xz
testing/atop: new aport
Resource-specific view of processes http://www.atcomputing.nl/Tools/atop fixes #288 (cherry picked from commit fb7d2be5b58198d4934d69f27d0140182df3737d)
-rw-r--r--testing/atop/APKBUILD42
-rw-r--r--testing/atop/atop.initd21
2 files changed, 63 insertions, 0 deletions
diff --git a/testing/atop/APKBUILD b/testing/atop/APKBUILD
new file mode 100644
index 00000000..1936dd02
--- /dev/null
+++ b/testing/atop/APKBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=atop
+pkgver=1.24
+pkgrel=0
+pkgdesc="Resource-specific view of processes"
+url="http://www.atcomputing.nl/Tools/atop"
+license="GPL-2"
+depends=
+subpackages="$pkgname-doc"
+source="http://www.atoptool.nl/packages/atop-$pkgver.tar.gz
+ atop.initd"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ cd "$_builddir"
+ sed -i -e '/^CFLAGS/s: = -O : += :' \
+ -e '/^LDFLAGS/s: = : += :' Makefile
+ sed -i -e 's:bash:sh:' atop.daily
+ cp "$srcdir"/atop.initd atop.init
+ chmod a+rx atop.init
+}
+
+build() {
+ cd "$_builddir"
+ make
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/var/log/atop "$pkgdir"/var/run
+ make DESTDIR="$pkgdir" \
+ INIPATH=/etc/init.d \
+ SCRPATH=/etc/periodic/daily \
+ install
+ rm -f "$pkgdir"/etc/cron.d
+ mv "$pkgdir"/etc/periodic/daily/atop.daily \
+ "$pkgdir"/etc/periodic/daily/atop
+
+}
+
+md5sums="46522f7da28460e810e193ab46907af9 atop-1.24.tar.gz
+06aba14ddeadbb1d0c3594536785213b atop.initd"
diff --git a/testing/atop/atop.initd b/testing/atop/atop.initd
new file mode 100644
index 00000000..6d471c27
--- /dev/null
+++ b/testing/atop/atop.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atop.rc,v 1.1 2005/06/14 23:01:10 vapier Exp $
+
+_daily=/etc/periodic/daily/atop
+start(){
+ ebegin "Starting atop"
+ if [ -f "$_daily" ] ; then
+ start-stop-daemon --start --quiet --exec "$_daily"
+ eend $?
+ else
+ eend 1 "/etc/cron.d/atop doesnt exist!"
+ fi
+}
+
+stop(){
+ ebegin "Stopping atop"
+ start-stop-daemon --stop --pidfile /var/run/atop.pid
+ eend $?
+}