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

1.131   ! triaxx      1: # $NetBSD: Makefile,v 1.130 2018/12/08 17:12:37 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.131   ! triaxx     35: USE_TOOLS+=    digest 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.108     tez        49: .elif ${OPSYS} == "FreeBSD"
                     50: BUILDLINK_PASSTHRU_DIRS+=      /usr/src/sys
1.16      agc        51: .elif ${OPSYS} == "SunOS"
1.117     hauke      52: REAL_GROUP=            sys
1.21      agc        53: MAKE_ENV+=             CPPFLAGS=
1.117     hauke      54: CONFIGURE_ENV+=                LSOF_RANLIB="/bin/true"
1.16      agc        55: .endif
1.89      rillig     56: INSTALLATION_DIRS=     ${PKGMANDIR}/man8 sbin
1.40      agc        57: 
1.1       frueauf    58: post-extract:
1.108     tez        59: .if ${OPSYS} == "FreeBSD"
1.131   ! triaxx     60:        if [ ! -x /usr/src/sys ]; then \
1.108     tez        61:                ${ECHO} "Lsof requires kernel sources to be found in /usr/src/sys." ; \
                     62:                exit 1 ; \
1.131   ! triaxx     63:        fi
1.108     tez        64: .endif
1.131   ! triaxx     65:        cd ${TMPWRK} ; \
1.95      apb        66:        EXPMD5=`${GREP} 'MD5 (' README.${DISTNAME} | ${SED} 's/^[ ]*//'` ; \
1.39      agc        67:        CALCMD5=`${DIGEST} MD5 ${SRCBALL_NAME}.tar` ; \
1.29      wiz        68:        if [ "$${EXPMD5}"X != "$${CALCMD5}"X ]; then \
                     69:                ${ECHO} "Expected and calculated MD5 signatures don't agree." ; \
                     70:                ${ECHO} "($$EXPMD5 != $$CALCMD5)" ; \
1.95      apb        71:                exit 1 ; \
1.29      wiz        72:        fi ; \
1.128     tron       73:        ${TOOLS_PATH.bsdtar} -xf ${SRCBALL_NAME}.tar
1.131   ! triaxx     74:        cd ${WRKSRC} ; ${ECHO} "y" | ./Inventory || exit 1
1.1       frueauf    75: 
1.98      tnn        76: INSTALLATION_DIRS+=    sbin ${PKGMANDIR}/man8 share/lsof
                     77: SPECIAL_PERMS+=                ${PREFIX}/sbin/lsof ${REAL_ROOT_USER} ${REAL_GROUP} 2755
                     78: 
1.1       frueauf    79: do-install:
1.98      tnn        80:        ${INSTALL_PROGRAM} ${WRKSRC}/lsof ${DESTDIR}${PREFIX}/sbin
                     81:        ${INSTALL_MAN} ${WRKSRC}/lsof.8 \
                     82:          ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/lsof.8
                     83:        ${INSTALL_SCRIPT} ${WRKSRC}/scripts/* ${DESTDIR}${PREFIX}/share/lsof
1.131   ! triaxx     84:        ${CHMOD} 0444 ${DESTDIR}${PREFIX}/share/lsof/00*
1.1       frueauf    85: 
1.105     sbd        86: opt:
1.131   ! triaxx     87: .for dir in ${TEST_DIRS}
1.105     sbd        88:        ${RUN}${_ULIMIT_CMD}                    \
1.131   ! triaxx     89:        cd ${WRKSRC} && cd ${dir} &&            \
1.105     sbd        90:        ${TEST_MAKE_CMD} opt
                     91: .endfor
1.3       agc        92: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>