aboutsummaryrefslogtreecommitdiffstats
path: root/french/plgrenouille/Makefile
blob: 4cdebdf2c98bcfe690e8f25d9ba2fece629e9dbf (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# New ports collection makefile for:    plgrenouille_0
# Date created:             02 July 2002
# Whom:                 cyrille.lefevre@laposte.net
#
# $FreeBSD$
#

PORTNAME=   plgrenouille
PORTVERSION=    0.70.6
PORTREVISION=   5
CATEGORIES= french net
MASTER_SITES=   http://concept.free.free.fr/plgrenouille/beta/
DISTNAME=   ${PORTNAME}_${PORTVERSION:R}-${PORTVERSION:E}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Un client pour determiner votre bande passante a un raccordement large bande

LIB_DEPENDS=    netsnmp.16:${PORTSDIR}/net-mgmt/net-snmp
RUN_DEPENDS=    ${SITE_PERL}/Net/FTP.pm:${PORTSDIR}/net/p5-Net \
        ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \
        ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP

.if !defined(BATCH)
IS_INTERACTIVE= yes
.endif

NO_BUILD=   yes
USE_PERL5=  yes
USE_RC_SUBR=    plgrenouille.sh
SCRIPTS_ENV=    PKG_PREFIX=${PREFIX}
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION:R}
PKGDEINSTALL=   ${PKGINSTALL}
PLIST_SUB=  LBIN_DIR="${LBIN_DIR:S,^${PREFIX}/,,}" \
        CONF_DIR="${CONF_DIR:S,^${PREFIX}/,,}"
REINPLACE_SUB=  PREFIX=${PREFIX} PERL=${PERL} \
        LBIN_DIR=${LBIN_DIR} CONF_DIR=${CONF_DIR} \
        RUN_DIR=${RUN_DIR} LOG_DIR=${LOG_DIR} \
        SPOOL_DIR=${SPOOL_DIR} SPOOL_USER=${SPOOL_USER}
SUB_FILES=  pkg-message
SUB_LIST=   LBIN_DIR=${LBIN_DIR} RUN_DIR=${RUN_DIR} LOG_DIR=${LOG_DIR}
PKGMESSAGE= ${WRKDIR}/pkg-message

MAN1=       plgrenouille.1
DOC_FILES=  FAQ README
LBIN_DIR=   ${PREFIX}/libexec
MAN_DIR=    ${MAN1PREFIX}/man/man1
CONF_DIR=   ${PREFIX}/etc
RC_DIR=     ${PREFIX}/etc/rc.d
RUN_DIR=    /var/run
LOG_DIR=    /var/log
SPOOL_DIR=  /var/spool/${PORTNAME}
SPOOL_USER= daemon

post-patch:
    @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
        ${WRKSRC}/plgrenouille.pl ${WRKSRC}/Grenouille/Vars.pm
    @${REINPLACE_CMD} 's!swap_privileges!Grenouille::System::&!g' \
        ${WRKSRC}/Grenouille/Log.pm ${WRKSRC}/Grenouille/Preferences.pm

do-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/plgrenouille.pl \
        ${LBIN_DIR}/plgrenouille
    @${MKDIR} ${SITE_PERL}/Grenouille
    @${INSTALL_SCRIPT} ${WRKSRC}/Grenouille/*.pm \
        ${SITE_PERL}/Grenouille
    @${INSTALL_MAN} ${WRKSRC}/plgrenouille.1 ${MAN_DIR}
    @${INSTALL_DATA} ${WRKSRC}/grenouillerc.sample ${CONF_DIR}
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for file in ${DOC_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

post-install:
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_MSG}
    @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.mk>