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