summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-07-18 22:19:27 +0000
committerMike Frysinger <vapier@gentoo.org>2010-07-18 22:19:27 +0000
commitc60a8859c6f43b6f6bd5ae8edfd8a2081fd3680e (patch)
tree6a8b05e547672be3ca0a8d28b62e310c449f3387 /sys-process
parentold (diff)
downloadgentoo-2-c60a8859c6f43b6f6bd5ae8edfd8a2081fd3680e.tar.gz
gentoo-2-c60a8859c6f43b6f6bd5ae8edfd8a2081fd3680e.tar.bz2
gentoo-2-c60a8859c6f43b6f6bd5ae8edfd8a2081fd3680e.zip
Delete copies of binaries with -${PV} suffix and rewrite init.d script #320433 by Jeroen Roovers.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/atop/ChangeLog9
-rw-r--r--sys-process/atop/atop-1.25-r1.ebuild38
-rw-r--r--sys-process/atop/files/atop.rc21
3 files changed, 53 insertions, 15 deletions
diff --git a/sys-process/atop/ChangeLog b/sys-process/atop/ChangeLog
index e46dcee8e6a2..c69a836e1ef0 100644
--- a/sys-process/atop/ChangeLog
+++ b/sys-process/atop/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-process/atop
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/ChangeLog,v 1.33 2010/05/18 17:17:06 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/ChangeLog,v 1.34 2010/07/18 22:19:27 vapier Exp $
+
+*atop-1.25-r1 (18 Jul 2010)
+
+ 18 Jul 2010; Mike Frysinger <vapier@gentoo.org> +atop-1.25-r1.ebuild,
+ files/atop.rc:
+ Delete copies of binaries with -${PV} suffix and rewrite init.d script
+ #320433 by Jeroen Roovers.
*atop-1.25 (18 May 2010)
diff --git a/sys-process/atop/atop-1.25-r1.ebuild b/sys-process/atop/atop-1.25-r1.ebuild
new file mode 100644
index 000000000000..256fbc101172
--- /dev/null
+++ b/sys-process/atop/atop-1.25-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/atop-1.25-r1.ebuild,v 1.1 2010/07/18 22:19:27 vapier Exp $
+
+inherit toolchain-funcs
+
+DESCRIPTION="Resource-specific view of processes"
+HOMEPAGE="http://www.atoptool.nl/"
+SRC_URI="http://www.atoptool.nl/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~x86"
+IUSE=""
+
+DEPEND="sys-process/acct"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e '/^CFLAGS/s: = -O : += :' \
+ -e '/^LDFLAGS/s: = : += :' \
+ -e 's:\<cc\>:$(CC):' \
+ Makefile
+ tc-export CC
+ cp "${FILESDIR}"/atop.rc atop.init
+ chmod a+rx atop.init
+ sed -i 's: root : :' atop.cron #191926
+}
+
+src_install() {
+ emake DESTDIR="${D}" INIPATH=/etc/init.d install || die
+ # useless -${PV} copies ?
+ rm -f "${D}"/usr/bin/atop*-${PV}
+ dodoc README "${D}"/etc/cron.d/*
+ rm -r "${D}"/etc/cron.d || die
+}
diff --git a/sys-process/atop/files/atop.rc b/sys-process/atop/files/atop.rc
index 8a6b71587029..a6502fa941c2 100644
--- a/sys-process/atop/files/atop.rc
+++ b/sys-process/atop/files/atop.rc
@@ -1,23 +1,16 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2010 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 $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/files/atop.rc,v 1.2 2010/07/18 22:19:26 vapier Exp $
-start(){
+start() {
ebegin "Starting atop"
- if [ -f /etc/cron.d/atop ] ; then
- start-stop-daemon --start --quiet --exec /etc/atop/atop.daily
- eend $?
- else
- eend 1 "/etc/cron.d/atop doesnt exist!"
- fi
+ start-stop-daemon --start --quiet --exec /etc/atop/atop.daily
+ eend $?
}
-stop(){
+stop() {
ebegin "Stopping atop"
- PIDATOP=`ps -lef | grep -- '-w /var/log/atop/atop_' | grep -v grep | awk '{print $4}'`
- if [ "$PIDATOP" != "" ] ; then
- kill $PIDATOP
- fi
+ start-stop-daemon --stop --exec /usr/bin/atop --pidfile /var/run/atop.pid
eend $?
}