aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-01-09 15:32:10 +0800
committeredwin <edwin@FreeBSD.org>2004-01-09 15:32:10 +0800
commit8cfceead66ae0561462320b8b523eaac7086c68b (patch)
treef3a5923c56493bd00499c08995a4e823fbec24e1 /sysutils
parent9801f7b7f5fa96607ad9850795234bfe6f53c9d0 (diff)
downloadfreebsd-ports-gnome-8cfceead66ae0561462320b8b523eaac7086c68b.tar.gz
freebsd-ports-gnome-8cfceead66ae0561462320b8b523eaac7086c68b.tar.zst
freebsd-ports-gnome-8cfceead66ae0561462320b8b523eaac7086c68b.zip
Add sysutils/top back into the tree
As the first step in updating this popular program, I am releasing the current copy of the source for top 3.5. In the coming weeks this should become the final 3.5 release. Beta13 includes updated modules for freebsd, linux, and AIX. Included are all patches for FreeBSD 4.7 - 5.2 so that this version can be used as a drop-in replacement for the base versions (use TOP_OVERWRITE_BASE=yes)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/top/Makefile111
-rw-r--r--sysutils/top/distinfo13
-rw-r--r--sysutils/top/files/pkg-message-base7
-rw-r--r--sysutils/top/pkg-descr8
-rw-r--r--sysutils/top/pkg-plist1
6 files changed, 141 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index df2cb320efc3..d01ad11edd55 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -340,6 +340,7 @@
SUBDIR += ticker.app
SUBDIR += timelimit
SUBDIR += tmpwatch
+ SUBDIR += top
SUBDIR += toshctl
SUBDIR += tree
SUBDIR += ttyload
diff --git a/sysutils/top/Makefile b/sysutils/top/Makefile
new file mode 100644
index 000000000000..c4b57dafaa2a
--- /dev/null
+++ b/sysutils/top/Makefile
@@ -0,0 +1,111 @@
+# New ports collection makefile for: top
+# Date created: 9 January 2004
+# Whom: Edwin Groothuis (edwin@mavetju.org)
+#
+# $FreeBSD$
+#
+
+PORTNAME= top
+PORTVERSION= ${VERSION}.${BETA}
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:main/:S/%SUBDIR%/unixtop/} \
+ http://www.mavetju.org/download/adopted/:freebsd
+MASTER_SITE_SUBDIR= unixtop:main
+DISTFILES= ${PORTNAME}-${VERSION}beta${BETA}${EXTRACT_SUFX}:main \
+ top-${VERSION}beta${BETA}-src-FreeBSD${OSREL:S/.//}${EXTRACT_SUFX}:freebsd
+
+PATCH_SITES= http://www.mavetju.org/download/adopted/
+PATCHFILES= top-${VERSION}beta${BETA}-contrib-FreeBSD${OSREL:S/.//}.gz
+
+MAINTAINER= edwin@mavetju.org
+COMMENT= Display and update information about the top cpu processes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${VERSION}beta${BETA}
+VERSION= 3.5
+BETA= 13
+MAN1= top.1
+
+USE_REINPLACE= yes
+
+.if defined(TOP_OVERWRITE_BASE)
+PREFIX= /usr
+PKGNAMESUFFIX= -overwrite-base
+MANPREFIX= ${PREFIX}/share
+CONFIGURE_ARGS+=--mandir=${MANPREFIX}/man
+PLIST_SUB+= NOTBASE="@comment "
+PLIST_SUB+= BASE=""
+PKGMESSAGE= ${FILESDIR}/pkg-message-base
+.else
+PLIST_SUB+= BASE="@comment "
+PLIST_SUB+= NOTBASE=""
+.endif
+
+CFLAGS+= -DORDER -DHAVE_STRERROR -DHAVE_GETOPT -DBETA=\\"beta${BETA}\\"
+
+FREEBSDFILES= machine.c sigdesc.h top.local.1
+
+.include <bsd.port.pre.mk>
+
+OSREV!= ${UNAME} -r | ${TR} -cd A-Za-z0-9
+
+.if ${OSVERSION} < 470000
+IGNORE= "This port is not supported for this OS version."
+.endif
+
+.if !defined(TOP_OVERWRITE_BASE)
+pre-everything::
+ @${ECHO_MSG} "Use TOP_OVERWRITE_BASE=yes to install over the default top"
+ @/bin/sleep 5
+.endif
+
+#
+# Use the same method for configuring as the base top installation
+#
+post-extract:
+.for f in ${FREEBSDFILES}
+ @${CP} ${WRKDIR}/src/usr.bin/top/${f} ${WRKSRC}/$f
+.endfor
+ @${CP} ${WRKSRC}/Makefile.X ${WRKSRC}/Makefile
+ @${CP} ${WRKSRC}/top.local.H ${WRKSRC}/top.local.h
+ @${CP} ${WRKSRC}/top.X ${WRKSRC}/top.1
+ @${CAT} ${WRKDIR}/src/usr.bin/top/top.local.1 >> ${WRKSRC}/top.1
+
+post-patch:
+ ${REINPLACE_CMD} \
+ -e 's,%shell%,${SH},g' \
+ -e 's,%cc%,${CC},g' \
+ -e 's,%awk%,${AWK},g' \
+ -e 's,%install%,${INSTALL},g' \
+ -e 's,%owner%,${BINOWN},g' \
+ -e 's,%group%,kmem,g' \
+ -e 's,%mode%,2555,g' \
+ -e 's,%bindir%,${PREFIX}/bin,g' \
+ -e 's,%mandir%,${MANPREFIX}/man/man1/,g' \
+ -e 's,%manext%,1,g' \
+ -e 's,%mansty%,man,g' \
+ -e 's,%signal%,,g' \
+ -e 's,%topn%,-1,g' \
+ -e 's,%delay%,2,g' \
+ -e 's,%cflgs%,${CFLAGS},g' \
+ -e 's,%cdefs%,,g' \
+ -e 's,%libs%,-lkvm,g' \
+ -e 's,%termcap%,-ltermcap,g' \
+ -e 's,%math%,-lm,g' \
+ -e 's,%osrev%,-DOSREV=${OSREV},g' \
+ ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} \
+ -e 's,%LoadMax%,5.0,g' \
+ -e 's,%TableSize%,20011,g' \
+ -e 's,%NominalTopn%,18,g' \
+ -e 's,%topn%,-1,g' \
+ -e 's,%delay%,2,g' \
+ -e 's,%random%,1,g' \
+ ${WRKSRC}/top.local.h \
+ ${WRKSRC}/top.1 \
+
+.if defined(TOP_OVERWRITE_BASE)
+post-install:
+ ${CAT} ${PKGMESSAGE}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/sysutils/top/distinfo b/sysutils/top/distinfo
new file mode 100644
index 000000000000..b4d2dc29729d
--- /dev/null
+++ b/sysutils/top/distinfo
@@ -0,0 +1,13 @@
+MD5 (top-3.5beta13.tar.gz) = c494fecd6238b300e040ec58fe1be5f3
+MD5 (top-3.5beta13-contrib-FreeBSD47.gz) = 1d94f16b6cd653714e1c17d238b829c9
+MD5 (top-3.5beta13-contrib-FreeBSD48.gz) = 8c4beac211263fdef7f5e30989bf6555
+MD5 (top-3.5beta13-contrib-FreeBSD49.gz) = 259a4612d9f96d325601d95a1b83ab5a
+MD5 (top-3.5beta13-contrib-FreeBSD50.gz) = cf292bbe2909aecd85491504e438b3d8
+MD5 (top-3.5beta13-contrib-FreeBSD51.gz) = f1440f89400f2668a6b3987ed6dc870d
+MD5 (top-3.5beta13-contrib-FreeBSD52.gz) = c69321a6d7400d8845d029536729cc6b
+MD5 (top-3.5beta13-src-FreeBSD47.tar.gz) = 6a324a781abd34b9c8cf46571529dbe3
+MD5 (top-3.5beta13-src-FreeBSD48.tar.gz) = 3b813bbe935c65aaa4cda31cb23a3b78
+MD5 (top-3.5beta13-src-FreeBSD49.tar.gz) = 31446e93c90575a27ee9cc5e2230d91d
+MD5 (top-3.5beta13-src-FreeBSD50.tar.gz) = d556d6d1b576e978156e988da44975c3
+MD5 (top-3.5beta13-src-FreeBSD51.tar.gz) = 1497c850f1b7441cbce929103b6618d8
+MD5 (top-3.5beta13-src-FreeBSD52.tar.gz) = 4b2bfe9b07d79c2198cd2888069c78a3
diff --git a/sysutils/top/files/pkg-message-base b/sysutils/top/files/pkg-message-base
new file mode 100644
index 000000000000..0bf9e815f452
--- /dev/null
+++ b/sysutils/top/files/pkg-message-base
@@ -0,0 +1,7 @@
+***************************************
+* You can always reinstall the older *
+* top via the source directory of the *
+* base system: *
+* $ cd /usr/src/usr.bin/top *
+* $ make && make install *
+***************************************
diff --git a/sysutils/top/pkg-descr b/sysutils/top/pkg-descr
new file mode 100644
index 000000000000..55b0704bda0d
--- /dev/null
+++ b/sysutils/top/pkg-descr
@@ -0,0 +1,8 @@
+Top displays the top processes on the system and periodically
+updates this information. If standard output is an intelligent
+terminal (see below) then as many processes as will fit on the
+terminal screen are displayed by default. Otherwise, a good
+number of them are shown (around 20). Raw cpu percentage is used
+to rank the processes.
+
+WWW: http://www.groupsys.com/top/
diff --git a/sysutils/top/pkg-plist b/sysutils/top/pkg-plist
new file mode 100644
index 000000000000..48d83f8a6084
--- /dev/null
+++ b/sysutils/top/pkg-plist
@@ -0,0 +1 @@
+bin/top