diff options
author | Cheng-Lung Sung <clsung@FreeBSD.org> | 2007-01-15 01:18:55 +0000 |
---|---|---|
committer | Cheng-Lung Sung <clsung@FreeBSD.org> | 2007-01-15 01:18:55 +0000 |
commit | b1aa3e2227d82b3c4b1209b29212419d2b1d3c29 (patch) | |
tree | 2a30177b400fc9b431245440f1f853578d380f9d /www/lightsquid | |
parent | b84bd53df85f454d4bce0f90c9e106cc67b076fe (diff) | |
download | ports-b1aa3e2227d82b3c4b1209b29212419d2b1d3c29.tar.gz ports-b1aa3e2227d82b3c4b1209b29212419d2b1d3c29.zip |
Notes
Diffstat (limited to 'www/lightsquid')
-rw-r--r-- | www/lightsquid/Makefile | 67 | ||||
-rw-r--r-- | www/lightsquid/distinfo | 6 | ||||
-rw-r--r-- | www/lightsquid/files/patch-lightparser.pl | 11 | ||||
-rw-r--r-- | www/lightsquid/files/pkg-message.in | 7 | ||||
-rw-r--r-- | www/lightsquid/pkg-plist | 76 |
5 files changed, 99 insertions, 68 deletions
diff --git a/www/lightsquid/Makefile b/www/lightsquid/Makefile index 8f89e384d2f6..bae26e28b529 100644 --- a/www/lightsquid/Makefile +++ b/www/lightsquid/Makefile @@ -6,10 +6,9 @@ # PORTNAME= lightsquid -PORTVERSION= 1.7 +PORTVERSION= 1.7.1 CATEGORIES= www -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF EXTRACT_SUFX= .tgz MAINTAINER= ports@logvinov.com @@ -18,18 +17,18 @@ COMMENT= A light and fast web based squid proxy traffic analyser OPTIONS= GDSUPPORT "Graphics report support" on NO_BUILD= yes -USE_PERL5= yes +USE_PERL5_RUN= yes -WRKSRC= ${WRKDIR}/${PORTNAME} -DSTDIR= ${PREFIX}/www/${PORTNAME} -.if !defined(NOPORTDOCS) -SUB_LIST= DOCSDIR=${DOCSDIR} -SUB_FILES= pkg-message -.endif CONFIGS= lightsquid.cfg realname.cfg skipuser.cfg group.cfg REINPLACE_ARGS= -i "" PORTDOCS= gnugpl.txt install.txt readme.txt thanks.txt graph.txt logformat.txt \ templates.txt version.txt +SUB_FILES= pkg-message +.if !defined(NOPORTDOCS) +SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/readme.txt." +.else +SUB_LIST+= NOTEWORK="" +.endif .include <bsd.port.pre.mk> @@ -37,23 +36,45 @@ PORTDOCS= gnugpl.txt install.txt readme.txt thanks.txt graph.txt logformat.txt \ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/GD.pm:${PORTSDIR}/graphics/p5-GD .endif -do-patch: - @${REINPLACE_CMD} "s|/var/www/html/${PORTNAME}|${DSTDIR}|" ${WRKSRC}/lightsquid.cfg +post-patch: + @${REINPLACE_CMD} -e 's|/var/www/html/${PORTNAME}/lang|${DATADIR}/lang|' \ + -e 's|/var/www/html/${PORTNAME}\"|${PREFIX}/etc/${PORTNAME}\"|' \ + -e 's|/var/www/html/${PORTNAME}/ip2name|${PREFIX}/libexec/${PORTNAME}|' \ + -e 's|/var/www/html/${PORTNAME}|${PREFIX}/www/${PORTNAME}|' \ + ${WRKSRC}/lightsquid.cfg + @${FIND} -E ${WRKSRC} -maxdepth 1 -regex '.*\.(cgi|pl)' | \ + ${XARGS} ${REINPLACE_CMD} \ + -e 's|${PORTNAME}.cfg|${PREFIX}/etc/${PORTNAME}/${PORTNAME}.cfg|g' @${MV} ${WRKSRC}/group.cfg.src ${WRKSRC}/group.cfg -.for i in ${CONFIGS} - @${MV} ${WRKSRC}/${i} ${WRKSRC}/${i}.dist -.endfor do-install: - @${MKDIR} ${DSTDIR} - ${CP} -R ${WRKSRC}/ ${DSTDIR} - @${RM} -r ${DSTDIR}/doc + ${MKDIR} ${DATADIR}/lang + cd ${WRKSRC}/lang && \ + ${FIND} . -type f -regex '.*\.lng' -exec \ + ${INSTALL_DATA} "{}" "${DATADIR}/lang/{}" \; + ${MKDIR} ${PREFIX}/libexec/${PORTNAME} + cd ${WRKSRC}/ip2name && \ + ${FIND} . -type f -exec \ + ${INSTALL_DATA} "{}" "${PREFIX}/libexec/${PORTNAME}/{}" \; + ${MKDIR} ${PREFIX}/etc/${PORTNAME} .for i in ${CONFIGS} - @${CP} -n ${DSTDIR}/${i}.dist ${DSTDIR}/${i} + ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/etc/${PORTNAME}/${i}.dist +.if !exists(${PREFIX}/etc/${PORTNAME}/${i}) + ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/etc/${PORTNAME}/ +.endif .endfor - @${CHMOD} +x ${DSTDIR}/*.cgi - @${CHMOD} +x ${DSTDIR}/*.pl - @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DSTDIR} + ${MKDIR} ${PREFIX}/www/${PORTNAME}/report + ${MKDIR} ${PREFIX}/www/${PORTNAME}/tpl + cd ${WRKSRC}/tpl && \ + ${FIND} . -type d ! -empty -exec \ + ${MKDIR} "${PREFIX}/www/${PORTNAME}/tpl/{}" \; && \ + ${FIND} . -type f -exec \ + ${INSTALL_DATA} "{}" "${PREFIX}/www/${PORTNAME}/tpl/{}" \; + cd ${WRKSRC} && \ + ${FIND} -E . -maxdepth 1 -regex '.*\.(cgi|pl)' -exec \ + ${INSTALL_SCRIPT} "{}" "${PREFIX}/www/${PORTNAME}/{}" \; && \ + ${INSTALL_DATA} .htaccess ${PREFIX}/www/${PORTNAME}/ + @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/www/${PORTNAME} .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for i in ${PORTDOCS} @@ -62,8 +83,6 @@ do-install: .endif post-install: -.if !defined(NOPORTDOCS) @${CAT} ${PKGMESSAGE} -.endif .include <bsd.port.post.mk> diff --git a/www/lightsquid/distinfo b/www/lightsquid/distinfo index 057d5a892e69..288ef1278616 100644 --- a/www/lightsquid/distinfo +++ b/www/lightsquid/distinfo @@ -1,3 +1,3 @@ -MD5 (lightsquid-1.7.tgz) = f97aa46d48e18879cf2dc0d358fd5fec -SHA256 (lightsquid-1.7.tgz) = 01b8cbaaa49f441c3148525c47145ce2119aab40b63a575a9a04dd5fa561e7d9 -SIZE (lightsquid-1.7.tgz) = 53125 +MD5 (lightsquid-1.7.1.tgz) = 16e02500a947402e78fa789946116fc5 +SHA256 (lightsquid-1.7.1.tgz) = c6f669a7f8e0b25b38fb969f84f25e456d922be67eee8bb5686c3c804c2d0192 +SIZE (lightsquid-1.7.1.tgz) = 53979 diff --git a/www/lightsquid/files/patch-lightparser.pl b/www/lightsquid/files/patch-lightparser.pl new file mode 100644 index 000000000000..577d62309980 --- /dev/null +++ b/www/lightsquid/files/patch-lightparser.pl @@ -0,0 +1,11 @@ +--- lightparser.pl.orig Wed Jan 10 19:06:49 2007 ++++ lightparser.pl Thu Jan 11 00:53:59 2007 +@@ -36,7 +36,7 @@ + require "common.pl"; + + #include ip2name function +-require "ip2name/ip2name.$ip2name"; ++require "$ip2namepath/ip2name.$ip2name"; + + $SIG{INT} = \&LOCKREMOVER; # traps keyboard interrupt + my $lockfilepath ="$lockpath/lockfile"; diff --git a/www/lightsquid/files/pkg-message.in b/www/lightsquid/files/pkg-message.in index 7d78106d2ed2..7061cc047b87 100644 --- a/www/lightsquid/files/pkg-message.in +++ b/www/lightsquid/files/pkg-message.in @@ -1,3 +1,4 @@ -************************************************************************** -Read the %%DOCSDIR%%/install.txt to configure lightsquid -************************************************************************** +**************************************************************************** +%%NOTEWORK%% +Edit %%PREFIX%%/etc/lightsquid/lightsquid.cfg to suit your needs. +**************************************************************************** diff --git a/www/lightsquid/pkg-plist b/www/lightsquid/pkg-plist index edbc45710269..8031f4a2931a 100644 --- a/www/lightsquid/pkg-plist +++ b/www/lightsquid/pkg-plist @@ -1,30 +1,37 @@ -@unexec if cmp -s %D/www/lightsquid/group.cfg %D/www/lightsquid/group.cfg.dist; then rm -f %D/www/lightsquid/group.cfg; fi -@unexec if cmp -s %D/www/lightsquid/realname.cfg %D/www/lightsquid/realname.cfg.dist; then rm -f %D/www/lightsquid/realname.cfg; fi -@unexec if cmp -s %D/www/lightsquid/skipuser.cfg %D/www/lightsquid/skipuser.cfg.dist; then rm -f %D/www/lightsquid/skipuser.cfg; fi -@unexec if cmp -s %D/www/lightsquid/lightsquid.cfg %D/www/lightsquid/lightsquid.cfg.dist; then rm -f %D/www/lightsquid/lightsquid.cfg; fi -www/lightsquid/ip2name/ip2name.demo -www/lightsquid/ip2name/ip2name.dhcp -www/lightsquid/ip2name/ip2name.dns -www/lightsquid/ip2name/ip2name.ip -www/lightsquid/ip2name/ip2name.list -www/lightsquid/ip2name/ip2name.simple -www/lightsquid/ip2name/ip2name.smb -www/lightsquid/ip2name/ip2name.squidauth -www/lightsquid/ip2name/ip2name.squidlist -www/lightsquid/ip2name/ip2name.squidlist2 -www/lightsquid/lang/bg.lng -www/lightsquid/lang/check_lng.pl -www/lightsquid/lang/check_tpl_lng.pl -www/lightsquid/lang/cz.lng -www/lightsquid/lang/eng.lng -www/lightsquid/lang/fr.lng -www/lightsquid/lang/hu.lng -www/lightsquid/lang/it.lng -www/lightsquid/lang/pt_br.lng -www/lightsquid/lang/ru-koi8.lng -www/lightsquid/lang/ru.lng -www/lightsquid/lang/sp.lng -www/lightsquid/lang/ua.lng +@unexec if cmp -s %D/etc/lightsquid/group.cfg %D/etc/lightsquid/group.cfg.dist; then rm -f %D/etc/lightsquid/group.cfg; fi +@unexec if cmp -s %D/etc/lightsquid/realname.cfg %D/etc/lightsquid/realname.cfg.dist; then rm -f %D/etc/lightsquid/realname.cfg; fi +@unexec if cmp -s %D/etc/lightsquid/skipuser.cfg %D/etc/lightsquid/skipuser.cfg.dist; then rm -f %D/etc/lightsquid/skipuser.cfg; fi +@unexec if cmp -s %D/etc/lightsquid/lightsquid.cfg %D/etc/lightsquid/lightsquid.cfg.dist; then rm -f %D/etc/lightsquid/lightsquid.cfg; fi +etc/lightsquid/group.cfg.dist +@exec [ -f %B/group.cfg ] || cp %B/%f %B/group.cfg +etc/lightsquid/lightsquid.cfg.dist +@exec [ -f %B/lightsquid.cfg ] || cp %B/%f %B/lightsquid.cfg +etc/lightsquid/realname.cfg.dist +@exec [ -f %B/realname.cfg ] || cp %B/%f %B/realname.cfg +etc/lightsquid/skipuser.cfg.dist +@exec [ -f %B/skipuser.cfg ] || cp %B/%f %B/skipuser.cfg +libexec/lightsquid/ip2name.abils +libexec/lightsquid/ip2name.demo +libexec/lightsquid/ip2name.dhcp +libexec/lightsquid/ip2name.dns +libexec/lightsquid/ip2name.ip +libexec/lightsquid/ip2name.list +libexec/lightsquid/ip2name.simple +libexec/lightsquid/ip2name.smb +libexec/lightsquid/ip2name.squidauth +libexec/lightsquid/ip2name.squidlist +libexec/lightsquid/ip2name.squidlist2 +%%DATADIR%%/lang/bg.lng +%%DATADIR%%/lang/cz.lng +%%DATADIR%%/lang/eng.lng +%%DATADIR%%/lang/fr.lng +%%DATADIR%%/lang/hu.lng +%%DATADIR%%/lang/it.lng +%%DATADIR%%/lang/pt_br.lng +%%DATADIR%%/lang/ru-koi8.lng +%%DATADIR%%/lang/ru.lng +%%DATADIR%%/lang/sp.lng +%%DATADIR%%/lang/ua.lng www/lightsquid/tpl/base/bigfiles.html www/lightsquid/tpl/base/day_detail.html www/lightsquid/tpl/base/graph.html @@ -49,13 +56,6 @@ www/lightsquid/tpl/text/whousesite.html www/lightsquid/tpl/text/topsites.html www/lightsquid/tpl/text/month_detail.html www/lightsquid/tpl/text/day_detail.html -www/lightsquid/report/delete.me -www/lightsquid/group.cfg.dist -@exec [ -f %B/group.cfg ] || cp %B/%f %B/group.cfg -www/lightsquid/lightsquid.cfg.dist -@exec [ -f %B/lightsquid.cfg ] || cp %B/%f %B/lightsquid.cfg -www/lightsquid/realname.cfg.dist -@exec [ -f %B/realname.cfg ] || cp %B/%f %B/realname.cfg www/lightsquid/bigfiles.cgi www/lightsquid/day_detail.cgi www/lightsquid/fixreport.pl @@ -64,8 +64,6 @@ www/lightsquid/graph.cgi www/lightsquid/group_detail.cgi www/lightsquid/index.cgi www/lightsquid/month_detail.cgi -www/lightsquid/skipuser.cfg.dist -@exec [ -f %B/skipuser.cfg ] || cp %B/%f %B/skipuser.cfg www/lightsquid/topsites.cgi www/lightsquid/user_detail.cgi www/lightsquid/user_month.cgi @@ -75,11 +73,13 @@ www/lightsquid/.htaccess www/lightsquid/check-setup.pl www/lightsquid/common.pl www/lightsquid/lightparser.pl +@dirrmtry etc/lightsquid +@dirrmtry libexec/lightsquid +@dirrmtry %%DATADIR%%/lang +@dirrmtry %%DATADIR%% @dirrmtry www/lightsquid/tpl/base/images @dirrmtry www/lightsquid/tpl/base @dirrmtry www/lightsquid/tpl/text @dirrmtry www/lightsquid/tpl -@dirrmtry www/lightsquid/lang -@dirrmtry www/lightsquid/ip2name @dirrmtry www/lightsquid/report @dirrmtry www/lightsquid |