aboutsummaryrefslogtreecommitdiffstats
path: root/www/mysar/Makefile
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2008-04-28 20:32:01 +0800
committeredwin <edwin@FreeBSD.org>2008-04-28 20:32:01 +0800
commitc3a3b67f5b90fc3f47a3cb5e51ffd1319a1462b9 (patch)
tree62653c52eee7f3fdb3921cf14677298608cf9bbf /www/mysar/Makefile
parent72ce9531f25974cc9a2a8d2309aab35357612e57 (diff)
downloadfreebsd-ports-gnome-c3a3b67f5b90fc3f47a3cb5e51ffd1319a1462b9.tar.gz
freebsd-ports-gnome-c3a3b67f5b90fc3f47a3cb5e51ffd1319a1462b9.tar.zst
freebsd-ports-gnome-c3a3b67f5b90fc3f47a3cb5e51ffd1319a1462b9.zip
Update to 2.1.4
Diffstat (limited to 'www/mysar/Makefile')
-rw-r--r--www/mysar/Makefile44
1 files changed, 32 insertions, 12 deletions
diff --git a/www/mysar/Makefile b/www/mysar/Makefile
index 16c6f38f7933..6b88ff45ee55 100644
--- a/www/mysar/Makefile
+++ b/www/mysar/Makefile
@@ -7,8 +7,7 @@
#
PORTNAME= mySAR
-PORTVERSION= 2.0.12
-PORTREVISION= 1
+PORTVERSION= 2.1.4
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mysar
@@ -17,10 +16,13 @@ DISTNAME= ${PORTNAME:L}-${PORTVERSION}
MAINTAINER= edwin@mavetju.org
COMMENT= MySQL Squid Access Report
-WRKSRC= ${WRKDIR}/${PORTNAME:L}
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
+
+WRKROOT= ${WRKDIR}/${PORTNAME:L}
+WRKSRC= ${WRKROOT}/bin/mysar-binary-importer/
+GNU_CONFIGURE= yes
USE_MYSQL= yes
USE_PHP= mysql pcre
-NO_BUILD= yes
MYSARPREFIX= mysar
MYSARDIR?= ${PREFIX}/${MYSARPREFIX}
@@ -30,21 +32,39 @@ SUB_FILES= pkg-message
SUB_LIST= MYSARDIR=${MYSARDIR}
PKGMESSAGE= ${WRKDIR}/pkg-message
+post-extract:
+ ${CHMOD} +x ${WRKSRC}/config/*
+
post-patch:
- ${REINPLACE_CMD} -e 's,%%MYSARDIR%%,${MYSARDIR},g' \
- ${WRKSRC}/etc/*
- ${REINPLACE_CMD} -e 's,%%PHP%%,${LOCALBASE}/bin/php,g' \
- ${WRKSRC}/bin/*
+ ${REINPLACE_CMD} \
+ -e 's,/usr/local/mysar/,${MYSARDIR},g' \
+ ${WRKROOT}/etc/mysar.cron
+ ${REINPLACE_CMD} \
+ -e 's,/usr/local/mysar/,${MYSARDIR},g' \
+ ${WRKROOT}/etc/mysar.apache
- ${FIND} ${WRKSRC} -name *.orig -delete
- ${FIND} ${WRKSRC} -name *.bak -delete
+ ${REINPLACE_CMD} \
+ -e 's,%%MYSARDIR%%,${MYSARDIR},g' \
+ `find ${WRKROOT}/etc -type f`
+ ${REINPLACE_CMD} \
+ -e 's,%%PHP%%,${LOCALBASE}/bin/php,g' \
+ `find ${WRKROOT}/bin -type f`
+ ${REINPLACE_CMD} \
+ -e 's,/bin/sh,${LOCALBASE}/bin/bash,g' \
+ `find ${WRKROOT}/bin/mysar-binary-importer -type f`
+
+ ${FIND} ${WRKROOT} -name *.orig -delete
+ ${FIND} ${WRKROOT} -name *.bak -delete
do-install:
+ ${MV} ${WRKSRC} ${WRKROOT}
${MKDIR} ${MYSARDIR}
- ${CP} -R ${WRKSRC}/* ${MYSARDIR}
+ ${CP} -R `find ${WRKROOT} -mindepth 1 -maxdepth 1 ! -name mysar-binary-importer` ${MYSARDIR}
+ ${INSTALL_PROGRAM} ${WRKROOT}/mysar-binary-importer/src/mysar ${MYSARDIR}/bin
+ ${INSTALL_DATA} ${WRKROOT}/mysar-binary-importer/mysar.conf ${MYSARDIR}/etc
${CHOWN} -R ${WWWOWN} ${MYSARDIR}/www-templates
${CHOWN} -R ${WWWOWN} ${MYSARDIR}/smarty-tmp
-post-install:
${CAT} ${PKGMESSAGE}
+
.include <bsd.port.mk>