Skip to content

Commit

Permalink
- Add LICENSE
Browse files Browse the repository at this point in the history
- Pet portlint
- Add NO_ARCH
- Switch to options helpers
- Don't cat pkg-message from Makefile
  • Loading branch information
AMDmi3 committed Sep 25, 2015
1 parent 9096021 commit cff6381
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions www/lightsquid/Makefile
Expand Up @@ -10,35 +10,32 @@ MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= Light and fast web based squid proxy traffic analyser

OPTIONS_DEFINE= GD DOCS
OPTIONS_DEFAULT= GD
LICENSE= GPLv2 # or later
LICENSE_FILE= ${WRKSRC}/doc/gnugpl.txt

USES= perl5 tar:tgz shebangfix
USES= perl5 shebangfix tar:tgz
SHEBANG_FILES= *.cgi *.pl tools/SiteAggregator/*.pl lang/*.pl tools/*.pl \
lightsquid.cfg
USE_PERL5= run
NO_BUILD= yes
NO_ARCH= yes

PLIST_SUB+= WWWOWN="${WWWOWN}" \
WWWGRP="${WWWGRP}" \
CHOWN="${CHOWN}"

.include <bsd.port.options.mk>

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 ${PORT_OPTIONS:MDOCS}
SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/readme.txt."
.else
SUB_LIST+= NOTEWORK=""
.endif

.if ${PORT_OPTIONS:MGD}
RUN_DEPENDS+= p5-GD>=0:${PORTSDIR}/graphics/p5-GD
.endif
OPTIONS_DEFINE= GD DOCS
OPTIONS_DEFAULT= GD

GD_RUN_DEPENDS= p5-GD>=0:${PORTSDIR}/graphics/p5-GD
DOCS_SUB_LIST= NOTEWORK="Read ${DOCSDIR}/readme.txt."
DOCS_SUB_LIST_OFF=NOTEWORK=

post-patch:
@${REINPLACE_CMD} -e 's|/var/www/html/${PORTNAME}/lang|${DATADIR}/lang| ; \
Expand Down Expand Up @@ -76,15 +73,11 @@ do-install:
${FIND} -E . -maxdepth 1 -regex '.*\.(cgi|pl)' -exec \
${INSTALL_SCRIPT} "{}" "${STAGEDIR}/${WWWDIR}/{}" \; && \
${INSTALL_DATA} .htaccess ${STAGEDIR}/${WWWDIR}/
# @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}/${WWWDIR}
.if ${PORT_OPTIONS:MDOCS}

do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}/${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}/${DOCSDIR}
.endfor
.endif

post-install:
@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>

0 comments on commit cff6381

Please sign in to comment.