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

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

CVSweb <webmaster@jp.NetBSD.org>