ports/107810: [maintainer update] www/lightsquid: update to 1.7.1
Alexander Logvinov
ports at logvinov.com
Thu Jan 11 01:40:13 UTC 2007
>Number: 107810
>Category: ports
>Synopsis: [maintainer update] www/lightsquid: update to 1.7.1
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 11 01:40:12 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Alexander Logvinov
>Release: FreeBSD 6.1-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
Update to 1.7.1
Try to distribute config, data files
Note: config files are located in ${PREFIX}/etc/lightsquid now
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/www/lightsquid/Makefile lightsquid/Makefile
--- /usr/ports/www/lightsquid/Makefile Sat Nov 25 11:00:01 2006
+++ lightsquid/Makefile Thu Jan 11 10:29:53 2007
@@ -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 at logvinov.com
@@ -18,18 +17,18 @@
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 @@
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 @@
.endif
post-install:
-.if !defined(NOPORTDOCS)
@${CAT} ${PKGMESSAGE}
-.endif
.include <bsd.port.post.mk>
diff -urN /usr/ports/www/lightsquid/distinfo lightsquid/distinfo
--- /usr/ports/www/lightsquid/distinfo Sat Nov 25 11:00:01 2006
+++ lightsquid/distinfo Wed Jan 10 22:53:29 2007
@@ -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 -urN /usr/ports/www/lightsquid/files/patch-lightparser.pl lightsquid/files/patch-lightparser.pl
--- /usr/ports/www/lightsquid/files/patch-lightparser.pl Thu Jan 1 09:00:00 1970
+++ lightsquid/files/patch-lightparser.pl Thu Jan 11 00:54:23 2007
@@ -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 -urN /usr/ports/www/lightsquid/files/pkg-message.in lightsquid/files/pkg-message.in
--- /usr/ports/www/lightsquid/files/pkg-message.in Sat Nov 25 11:00:01 2006
+++ lightsquid/files/pkg-message.in Thu Jan 11 09:55:15 2007
@@ -1,3 +1,4 @@
-**************************************************************************
-Read the %%DOCSDIR%%/install.txt to configure lightsquid
-**************************************************************************
+****************************************************************************
+%%NOTEWORK%%
+Edit %%PREFIX%%/etc/lightsquid/lightsquid.cfg to suit your needs.
+****************************************************************************
diff -urN /usr/ports/www/lightsquid/pkg-plist lightsquid/pkg-plist
--- /usr/ports/www/lightsquid/pkg-plist Sat Nov 25 11:00:01 2006
+++ lightsquid/pkg-plist Thu Jan 11 00:59:23 2007
@@ -1,30 +1,37 @@
- at unexec if cmp -s %D/www/lightsquid/group.cfg %D/www/lightsquid/group.cfg.dist; then rm -f %D/www/lightsquid/group.cfg; fi
- at unexec if cmp -s %D/www/lightsquid/realname.cfg %D/www/lightsquid/realname.cfg.dist; then rm -f %D/www/lightsquid/realname.cfg; fi
- at unexec if cmp -s %D/www/lightsquid/skipuser.cfg %D/www/lightsquid/skipuser.cfg.dist; then rm -f %D/www/lightsquid/skipuser.cfg; fi
- at 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
+ at unexec if cmp -s %D/etc/lightsquid/group.cfg %D/etc/lightsquid/group.cfg.dist; then rm -f %D/etc/lightsquid/group.cfg; fi
+ at unexec if cmp -s %D/etc/lightsquid/realname.cfg %D/etc/lightsquid/realname.cfg.dist; then rm -f %D/etc/lightsquid/realname.cfg; fi
+ at unexec if cmp -s %D/etc/lightsquid/skipuser.cfg %D/etc/lightsquid/skipuser.cfg.dist; then rm -f %D/etc/lightsquid/skipuser.cfg; fi
+ at 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
+ at exec [ -f %B/group.cfg ] || cp %B/%f %B/group.cfg
+etc/lightsquid/lightsquid.cfg.dist
+ at exec [ -f %B/lightsquid.cfg ] || cp %B/%f %B/lightsquid.cfg
+etc/lightsquid/realname.cfg.dist
+ at exec [ -f %B/realname.cfg ] || cp %B/%f %B/realname.cfg
+etc/lightsquid/skipuser.cfg.dist
+ at 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/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
- at exec [ -f %B/group.cfg ] || cp %B/%f %B/group.cfg
-www/lightsquid/lightsquid.cfg.dist
- at exec [ -f %B/lightsquid.cfg ] || cp %B/%f %B/lightsquid.cfg
-www/lightsquid/realname.cfg.dist
- at 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/group_detail.cgi
www/lightsquid/index.cgi
www/lightsquid/month_detail.cgi
-www/lightsquid/skipuser.cfg.dist
- at 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/check-setup.pl
www/lightsquid/common.pl
www/lightsquid/lightparser.pl
+ at dirrmtry etc/lightsquid
+ at dirrmtry libexec/lightsquid
+ at dirrmtry %%DATADIR%%/lang
+ at dirrmtry %%DATADIR%%
@dirrmtry www/lightsquid/tpl/base/images
@dirrmtry www/lightsquid/tpl/base
@dirrmtry www/lightsquid/tpl/text
@dirrmtry www/lightsquid/tpl
- at dirrmtry www/lightsquid/lang
- at dirrmtry www/lightsquid/ip2name
@dirrmtry www/lightsquid/report
@dirrmtry www/lightsquid
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list