aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/DTraceToolkit/Makefile
blob: fc7fabd18a46ff815214f409e0a5ff964f6a0e28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# New ports collection makefile for:    DTraceToolkit
# Date created:     2008-12-11
# Whom:         Steven Kreuzer <steven@exit2shell.com>
#
# $FreeBSD$
#

PORTNAME=   DTraceToolkit
PORTVERSION=    0.99
CATEGORIES= sysutils
MASTER_SITES=   http://www.brendangregg.com/ \
        http://mirror.transact.net.au/sourceforge/d/dt/dtracetoolkit/

MAINTAINER= skreuzer@FreeBSD.org
COMMENT=    Collection of useful scripts for DTrace

NO_BUILD=   YES

.include <bsd.port.pre.mk>

.if ${OSVERSION} <= 701000
IGNORE= needs to have dtrace enabled kernel
.endif

pre-patch:
    ${REINPLACE_CMD} -e \
        "s|\#\!/usr/bin/perl|\#\!${PREFIX}/bin/perl|g" \
        ${WRKSRC}/hotkernel

    ${REINPLACE_CMD} -e \
        "s|\#\!/usr/bin/sh|\#\!/bin/sh|g" \
        ${WRKSRC}/procsystime

do-install:
    ${RM} ${WRKSRC}/hotkernel.bak
    ${RM} ${WRKSRC}/procsystime.bak
    ${MKDIR} ${DATADIR}
    (cd ${WRKSRC}; ${TAR} cf - . ) | \
        (cd ${DATADIR}/; ${TAR} xvf -)
    ${LN} -fs ${DATADIR}/hotkernel ${PREFIX}/bin/hotkernel
    ${LN} -fs ${DATADIR}/procsystime ${PREFIX}/bin/procsystime

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>