Annotation of pkgsrc/sysutils/lsof/Makefile, revision 1.121
1.121 ! bsiegert 1: # $NetBSD: Makefile,v 1.120 2015/06/12 10:51:14 wiz Exp $
1.1 frueauf 2:
1.121 ! bsiegert 3: DISTNAME= lsof_4.88
1.107 sbd 4: PKGNAME= ${DISTNAME:S/_/-/}
1.1 frueauf 5: CATEGORIES= sysutils
1.101 zafer 6: MASTER_SITES= ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ \
7: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/NEW/ \
8: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/ \
1.106 sbd 9: ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/ \
10: ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/NEW/ \
11: ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/OLD/ \
12: ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/ \
13: ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/NEW/ \
14: ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/OLD/ \
15: ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \
16: ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/NEW/ \
17: ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/OLD/ \
18: ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \
19: ftp://sunsite.ualberta.ca/pub/Mirror/lsof/NEW/ \
20: ftp://sunsite.ualberta.ca/pub/Mirror/lsof/OLD/
1.78 atatat 21: EXTRACT_SUFX= .tar.bz2
1.1 frueauf 22:
1.103 wiz 23: MAINTAINER= pkgsrc-users@NetBSD.org
1.90 markd 24: HOMEPAGE= http://people.freebsd.org/~abe/
1.35 wiz 25: COMMENT= Lists information about open files
1.1 frueauf 26:
1.73 agc 27: WRKSRC= ${WRKDIR}/${DISTNAME}/${SRCBALL_NAME}
1.1 frueauf 28: HAS_CONFIGURE= yes
1.28 tron 29: CONFIGURE_SCRIPT= ./Configure
1.87 rillig 30: CONFIGURE_ARGS+= -n ${LOWER_OPSYS}
1.38 jlam 31: CONFIGURE_ENV+= LSOF_CC="${CC} ${CFLAGS}"
1.49 atatat 32: MAKE_FLAGS+= LSOF_BLDCMT="NetBSD pkgsrc rocks!"
1.51 hubertf 33: OSVERSION_SPECIFIC= yes
1.1 frueauf 34:
1.62 salo 35: TMPWRK= ${WRKDIR}/${DISTNAME}
1.50 atatat 36: SRCBALL_NAME= ${DISTNAME}_src
1.1 frueauf 37:
1.94 tron 38: REPLACE_PERL+= scripts/sort_res.perl5 scripts/count_pf.perl5 \
39: scripts/list_NULf.perl5 scripts/big_brother.perl5 \
40: scripts/identd.perl5 scripts/shared.perl5 \
41: scripts/idrlogin.perl5 scripts/count_pf.perl \
42: scripts/idrlogin.perl scripts/list_fields.perl \
43: scripts/watch_a_file.perl
1.97 joerg 44: USE_TOOLS+= gtar pax perl:run
1.94 tron 45:
1.105 sbd 46: TEST_DIRS= tests
47: TEST_TARGET= test
48: INTERACTIVE_STAGE+= test
49:
1.16 agc 50: .include "../../mk/bsd.prefs.mk"
1.104 sbd 51: .include "options.mk"
1.16 agc 52:
1.98 tnn 53: REAL_GROUP= ${REAL_ROOT_GROUP}
1.16 agc 54: .if ${OPSYS} == "NetBSD"
1.98 tnn 55: REAL_GROUP= kmem
1.93 veego 56: CONFIGURE_ENV+= NETBSD_SYS="${NETBSDSRCDIR}/sys"
1.110 tron 57: CPPFLAGS+= -D_KMEMUSER
1.119 tnn 58: CPPFLAGS+= "-DVFS_PROTOS(fsname)="
1.108 tez 59: .elif ${OPSYS} == "FreeBSD"
60: BUILDLINK_PASSTHRU_DIRS+= /usr/src/sys
1.16 agc 61: .elif ${OPSYS} == "SunOS"
1.117 hauke 62: REAL_GROUP= sys
1.21 agc 63: MAKE_ENV+= CPPFLAGS=
1.117 hauke 64: CONFIGURE_ENV+= LSOF_RANLIB="/bin/true"
1.16 agc 65: .endif
1.89 rillig 66: INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin
1.40 agc 67:
1.1 frueauf 68: post-extract:
1.108 tez 69: .if ${OPSYS} == "FreeBSD"
70: @(if [ ! -x /usr/src/sys ]; then \
71: ${ECHO} "Lsof requires kernel sources to be found in /usr/src/sys." ; \
72: exit 1 ; \
73: fi)
74: .endif
1.50 atatat 75: @(cd ${TMPWRK} ; \
1.95 apb 76: EXPMD5=`${GREP} 'MD5 (' README.${DISTNAME} | ${SED} 's/^[ ]*//'` ; \
1.39 agc 77: CALCMD5=`${DIGEST} MD5 ${SRCBALL_NAME}.tar` ; \
1.29 wiz 78: if [ "$${EXPMD5}"X != "$${CALCMD5}"X ]; then \
79: ${ECHO} "Expected and calculated MD5 signatures don't agree." ; \
80: ${ECHO} "($$EXPMD5 != $$CALCMD5)" ; \
1.95 apb 81: exit 1 ; \
1.29 wiz 82: fi ; \
1.84 jlam 83: if [ X${EXTRACT_USING} = Xgtar ]; then \
1.29 wiz 84: ${GTAR} -xf ${SRCBALL_NAME}.tar; \
85: else \
1.97 joerg 86: pax -O -r < ${SRCBALL_NAME}.tar; \
1.29 wiz 87: fi)
1.2 frueauf 88: @( cd ${WRKSRC} ; ${ECHO} "y" | ./Inventory || exit 1 )
1.1 frueauf 89:
1.98 tnn 90: INSTALLATION_DIRS+= sbin ${PKGMANDIR}/man8 share/lsof
91: SPECIAL_PERMS+= ${PREFIX}/sbin/lsof ${REAL_ROOT_USER} ${REAL_GROUP} 2755
92:
1.1 frueauf 93: do-install:
1.98 tnn 94: ${INSTALL_PROGRAM} ${WRKSRC}/lsof ${DESTDIR}${PREFIX}/sbin
95: ${INSTALL_MAN} ${WRKSRC}/lsof.8 \
96: ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/lsof.8
97: ${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${DESTDIR}${PREFIX}/share/lsof
98: @${CHMOD} 0444 ${DESTDIR}${PREFIX}/share/lsof/00*
1.1 frueauf 99:
1.105 sbd 100: opt:
101: .for _dir_ in ${TEST_DIRS}
102: ${RUN}${_ULIMIT_CMD} \
103: cd ${WRKSRC} && cd ${_dir_} && \
104: ${TEST_MAKE_CMD} opt
105: .endfor
1.3 agc 106: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>