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

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

CVSweb <webmaster@jp.NetBSD.org>