diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-23 14:48:32 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-24 09:43:33 +0000 |
commit | ccefd232a50697581ac0e1edea5a9041b47d9765 (patch) | |
tree | 2e91fd8aca56edac1539ad3af3927abfe3358a1b | |
parent | 2e1f43938501d474ee0b5480eb92c9fc1ad0dd41 (diff) | |
download | alpine_aports-ccefd232a50697581ac0e1edea5a9041b47d9765.tar.bz2 alpine_aports-ccefd232a50697581ac0e1edea5a9041b47d9765.tar.xz alpine_aports-ccefd232a50697581ac0e1edea5a9041b47d9765.zip |
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/APKBUILD | 42 | ||||
-rw-r--r-- | testing/atop/atop.initd | 21 |
2 files changed, 63 insertions, 0 deletions
diff --git a/testing/atop/APKBUILD b/testing/atop/APKBUILD new file mode 100644 index 0000000000..1936dd020f --- /dev/null +++ b/testing/atop/APKBUILD | |||
@@ -0,0 +1,42 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | ||
2 | pkgname=atop | ||
3 | pkgver=1.24 | ||
4 | pkgrel=0 | ||
5 | pkgdesc="Resource-specific view of processes" | ||
6 | url="http://www.atcomputing.nl/Tools/atop" | ||
7 | license="GPL-2" | ||
8 | depends= | ||
9 | subpackages="$pkgname-doc" | ||
10 | source="http://www.atoptool.nl/packages/atop-$pkgver.tar.gz | ||
11 | atop.initd" | ||
12 | |||
13 | _builddir="$srcdir"/$pkgname-$pkgver | ||
14 | prepare() { | ||
15 | cd "$_builddir" | ||
16 | sed -i -e '/^CFLAGS/s: = -O : += :' \ | ||
17 | -e '/^LDFLAGS/s: = : += :' Makefile | ||
18 | sed -i -e 's:bash:sh:' atop.daily | ||
19 | cp "$srcdir"/atop.initd atop.init | ||
20 | chmod a+rx atop.init | ||
21 | } | ||
22 | |||
23 | build() { | ||
24 | cd "$_builddir" | ||
25 | make | ||
26 | } | ||
27 | |||
28 | package() { | ||
29 | cd "$_builddir" | ||
30 | mkdir -p "$pkgdir"/var/log/atop "$pkgdir"/var/run | ||
31 | make DESTDIR="$pkgdir" \ | ||
32 | INIPATH=/etc/init.d \ | ||
33 | SCRPATH=/etc/periodic/daily \ | ||
34 | install | ||
35 | rm -f "$pkgdir"/etc/cron.d | ||
36 | mv "$pkgdir"/etc/periodic/daily/atop.daily \ | ||
37 | "$pkgdir"/etc/periodic/daily/atop | ||
38 | |||
39 | } | ||
40 | |||
41 | md5sums="46522f7da28460e810e193ab46907af9 atop-1.24.tar.gz | ||
42 | 06aba14ddeadbb1d0c3594536785213b atop.initd" | ||
diff --git a/testing/atop/atop.initd b/testing/atop/atop.initd new file mode 100644 index 0000000000..6d471c2721 --- /dev/null +++ b/testing/atop/atop.initd | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/sbin/runscript | ||
2 | # Copyright 1999-2005 Gentoo Foundation | ||
3 | # Distributed under the terms of the GNU General Public License v2 | ||
4 | # $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atop.rc,v 1.1 2005/06/14 23:01:10 vapier Exp $ | ||
5 | |||
6 | _daily=/etc/periodic/daily/atop | ||
7 | start(){ | ||
8 | ebegin "Starting atop" | ||
9 | if [ -f "$_daily" ] ; then | ||
10 | start-stop-daemon --start --quiet --exec "$_daily" | ||
11 | eend $? | ||
12 | else | ||
13 | eend 1 "/etc/cron.d/atop doesnt exist!" | ||
14 | fi | ||
15 | } | ||
16 | |||
17 | stop(){ | ||
18 | ebegin "Stopping atop" | ||
19 | start-stop-daemon --stop --pidfile /var/run/atop.pid | ||
20 | eend $? | ||
21 | } | ||