aboutsummaryrefslogtreecommitdiffstats
path: root/www/mysar/Makefile
blob: f65c25cc50fcffd2007fcecdfe9dab3b12041b2a (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
#
# ports collection makefile for:    mysar
# Whom:                 Edwin Groothuis <edwin@mavetju.org>
# Date created:             2006-01-10
#
# $FreeBSD$
#

PORTNAME=   mySAR
PORTVERSION=    2.0.11
CATEGORIES= www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mysar
DISTNAME=   ${PORTNAME:L}-${PORTVERSION}

MAINTAINER= edwin@mavetju.org
COMMENT=    MySQL Squid Access Report

WRKSRC=     ${WRKDIR}/${PORTNAME:L}
USE_MYSQL=  yes
USE_PHP=    mysql
NO_BUILD=   yes

MYSARPREFIX=    mysar
MYSARDIR?=  ${PREFIX}/${MYSARPREFIX}
PLIST_SUB=  MYSAR=${MYSARPREFIX}

SUB_FILES=  pkg-message
SUB_LIST=   MYSARDIR=${MYSARDIR}
PKGMESSAGE= ${WRKDIR}/pkg-message

post-patch:
    ${REINPLACE_CMD} -e 's,%%MYSARDIR%%,${MYSARDIR},g' \
        ${WRKSRC}/etc/*
    ${REINPLACE_CMD} -e 's,%%PHP%%,${LOCALBASE}/bin/php,g' \
        ${WRKSRC}/bin/*

    ${FIND} ${WRKSRC} -name *.orig -delete
    ${FIND} ${WRKSRC} -name *.bak -delete

do-install:
    ${MKDIR} ${MYSARDIR}
    ${CP} -R ${WRKSRC}/* ${MYSARDIR}
    ${CHOWN} -R ${WWWOWN} ${MYSARDIR}/www-templates
    ${CHOWN} -R ${WWWOWN} ${MYSARDIR}/smarty-tmp

post-install:
    ${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>