1998-09-16 06:14:27 +02:00
|
|
|
# ex:ts=8
|
2000-02-13 04:25:05 +01:00
|
|
|
# Ports collection makefile for: lsof
|
|
|
|
# Date created: Sat July 20, 1996
|
|
|
|
# Whom: David O'Brien (obrien@FreeBSD.org)
|
1996-11-11 20:42:45 +01:00
|
|
|
#
|
1999-08-31 04:00:46 +02:00
|
|
|
# $FreeBSD$
|
1996-11-11 20:42:45 +01:00
|
|
|
#
|
|
|
|
|
2000-04-09 21:09:11 +02:00
|
|
|
PORTNAME= lsof
|
2005-07-19 15:42:59 +02:00
|
|
|
PORTVERSION= 4.75.2
|
1996-11-11 20:42:45 +01:00
|
|
|
CATEGORIES= sysutils
|
2003-12-17 01:16:26 +01:00
|
|
|
MASTER_SITES= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ \
|
|
|
|
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/NEW/ \
|
2003-10-20 02:12:06 +02:00
|
|
|
ftp://ftp.ayamura.org/pub/lsof/ \
|
|
|
|
ftp://ftp.ayamura.org/pub/lsof/NEW/ \
|
|
|
|
ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \
|
|
|
|
ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/NEW/ \
|
|
|
|
ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \
|
|
|
|
ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/NEW/ \
|
2000-07-16 23:14:48 +02:00
|
|
|
ftp://ftp.sunet.se/pub/unix/admin/lsof/ \
|
2003-10-20 02:12:06 +02:00
|
|
|
ftp://ftp.sunet.se/pub/unix/admin/lsof/NEW/ \
|
|
|
|
ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/ \
|
|
|
|
ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/NEW/ \
|
|
|
|
ftp://ftp.tau.ac.il/pub/unix/admin/
|
2005-07-19 15:42:59 +02:00
|
|
|
FIXUP_RELEASE=
|
2002-05-25 05:04:45 +02:00
|
|
|
.if defined(FIXUP_RELEASE)
|
2005-07-19 15:42:59 +02:00
|
|
|
DISTNAME= ${PORTNAME}_4.76B.freebsd
|
2002-05-25 05:04:45 +02:00
|
|
|
.else
|
2002-02-28 05:02:47 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
2001-10-20 21:18:54 +02:00
|
|
|
.endif
|
1996-11-11 20:42:45 +01:00
|
|
|
|
2000-02-13 04:25:05 +01:00
|
|
|
MAINTAINER= obrien@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= Lists information about open files (similar to fstat(1))
|
1997-05-26 12:28:04 +02:00
|
|
|
|
2002-05-25 05:04:45 +02:00
|
|
|
.if defined(FIXUP_RELEASE)
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
|
|
.else
|
2002-02-28 05:02:47 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}/${SRCBALL_NAME}
|
2002-05-25 05:04:45 +02:00
|
|
|
.endif
|
2004-01-18 11:30:14 +01:00
|
|
|
USE_BZIP2= yes
|
1996-11-11 20:42:45 +01:00
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
CONFIGURE_SCRIPT= Configure
|
|
|
|
CONFIGURE_ARGS= -n freebsd
|
2000-11-11 07:06:43 +01:00
|
|
|
CONFIGURE_ENV= LSOF_CC="${CC}"
|
2001-06-16 02:06:56 +02:00
|
|
|
FREEBSD_SYS?= /usr/src/sys
|
2004-07-16 01:14:29 +02:00
|
|
|
PLIST_FILES= sbin/lsof
|
1998-12-01 10:41:59 +01:00
|
|
|
MAN8= lsof.8
|
1996-11-11 20:42:45 +01:00
|
|
|
|
2002-02-28 05:02:47 +01:00
|
|
|
SRCBALL_NAME= ${DISTNAME:S/_W$//}_src
|
1996-11-11 20:42:45 +01:00
|
|
|
|
2001-09-02 00:00:47 +02:00
|
|
|
.if !defined(FIXUP_RELEASE)
|
1996-11-11 20:42:45 +01:00
|
|
|
post-extract:
|
2002-02-28 05:02:47 +01:00
|
|
|
@( cd ${WRKDIR}/${DISTNAME} ; \
|
|
|
|
EXPMD5=`${GREP} MD5 README.${DISTNAME} | ${SED} 's/[ ]*//'` ; \
|
1996-11-11 20:42:45 +01:00
|
|
|
CALCMD5=`${MD5} ${SRCBALL_NAME}.tar` ; \
|
|
|
|
if [ "$${EXPMD5}"X != "$${CALCMD5}"X ]; then \
|
1999-08-28 00:30:39 +02:00
|
|
|
${ECHO} "Expected and calculated MD5 signatures don't agree." ; \
|
|
|
|
${ECHO} "($$EXPMD5 != $$CALCMD5)" ; \
|
1996-11-11 20:42:45 +01:00
|
|
|
exit 1 ; \
|
|
|
|
fi ; \
|
2004-01-18 11:30:14 +01:00
|
|
|
${CAT} ${SRCBALL_NAME}.tar ${EXTRACT_AFTER_ARGS} \
|
1996-11-11 20:42:45 +01:00
|
|
|
)
|
2002-01-29 12:58:52 +01:00
|
|
|
@( cd ${WRKSRC} ; ${ECHO_CMD} "y" | ./Inventory || exit 1 )
|
2001-09-02 00:00:47 +02:00
|
|
|
.endif
|
1996-11-11 20:42:45 +01:00
|
|
|
|
1998-12-07 21:04:01 +01:00
|
|
|
#pre-patch:
|
|
|
|
# @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}"
|
|
|
|
# @${SED} -e "s|^--- d|--- dialects/freebsd/d|" \
|
|
|
|
# ${DISTDIR}/freebsd_3.0_patch > ${WRKDIR}/p
|
|
|
|
# ${PATCH} ${PATCH_DIST_ARGS} < ${WRKDIR}/p
|
1996-11-11 20:42:45 +01:00
|
|
|
|
|
|
|
do-install:
|
1998-09-16 06:14:27 +02:00
|
|
|
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -m 2755 -g kmem ${WRKSRC}/lsof ${PREFIX}/sbin
|
2003-03-25 19:16:12 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC}/lsof.8 ${MAN8PREFIX}/man/man8/lsof.8
|
1997-03-24 19:42:57 +01:00
|
|
|
@${MKDIR} ${PREFIX}/share/lsof
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${PREFIX}/share/lsof
|
1999-08-22 21:01:07 +02:00
|
|
|
@${CHMOD} 0444 ${PREFIX}/share/lsof/00*
|
1997-03-24 19:42:57 +01:00
|
|
|
|
2001-06-16 08:27:18 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${OSVERSION} < 500019
|
2001-06-16 04:10:56 +02:00
|
|
|
.if !exists(${FREEBSD_SYS}/miscfs/fdesc/fdesc.h)
|
2001-06-16 08:27:18 +02:00
|
|
|
.if defined(PACKAGE_BUILDING)
|
|
|
|
BROKEN= 'please install kernel source for official package builds'
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@${ECHO} ""
|
1998-12-01 10:40:48 +01:00
|
|
|
@${ECHO} "************************************************************"
|
|
|
|
@${ECHO} "* W a r n i n g *"
|
|
|
|
@${ECHO} "* A more capable version of LSOF is built if you have *"
|
2001-06-16 02:06:56 +02:00
|
|
|
@${ECHO} "* the complete kernel source installed. *"
|
|
|
|
@${ECHO} "* If your kernel sources are somewhere other than *"
|
|
|
|
@${ECHO} "* /usr/src/sys, you may set the FREEBSD_SYS variable *"
|
|
|
|
@${ECHO} "* to the correct path. *"
|
1998-12-01 10:40:48 +01:00
|
|
|
@${ECHO} "************************************************************"
|
2001-06-16 08:27:18 +02:00
|
|
|
@${ECHO} ""
|
|
|
|
.endif
|
1999-02-02 07:44:19 +01:00
|
|
|
.endif
|
1998-12-01 10:40:48 +01:00
|
|
|
|
2004-07-16 01:14:29 +02:00
|
|
|
post-install:
|
|
|
|
cd ${PREFIX} && \
|
|
|
|
${FIND} -s share/lsof -type f -o -type l >>${TMPPLIST} ;\
|
|
|
|
${FIND} -d share/lsof -type d \
|
|
|
|
| ${SED} -e 's/^/@dirrm /g' >>${TMPPLIST}
|
|
|
|
|
2001-06-16 08:27:18 +02:00
|
|
|
.include <bsd.port.post.mk>
|