Annotation of pkgsrc/sysutils/lsof/Makefile, revision 1.120

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

CVSweb <webmaster@jp.NetBSD.org>