aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/lmon
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-03-15 16:26:21 +0800
committerdanfe <danfe@FreeBSD.org>2014-03-15 16:26:21 +0800
commit10268f1439dc9774c1a75880f219e2ac444f564c (patch)
tree6bbec6bd7cf6bed7ca67c07cfcf640f2bf78eb88 /sysutils/lmon
parent2d9ec7b6a653c187fc77fc06c1629bedac4d3d2f (diff)
downloadfreebsd-ports-gnome-10268f1439dc9774c1a75880f219e2ac444f564c.tar.gz
freebsd-ports-gnome-10268f1439dc9774c1a75880f219e2ac444f564c.tar.zst
freebsd-ports-gnome-10268f1439dc9774c1a75880f219e2ac444f564c.zip
Stagify, cleanup Makefile, convert to OptionsNG, define LICENSE.
Diffstat (limited to 'sysutils/lmon')
-rw-r--r--sysutils/lmon/Makefile37
-rw-r--r--sysutils/lmon/pkg-plist9
2 files changed, 20 insertions, 26 deletions
diff --git a/sysutils/lmon/Makefile b/sysutils/lmon/Makefile
index 6e1fc7d236cb..13aaea9e4770 100644
--- a/sysutils/lmon/Makefile
+++ b/sysutils/lmon/Makefile
@@ -5,34 +5,37 @@ PORTNAME= lmon
PORTVERSION= 1.2
CATEGORIES= sysutils
MASTER_SITES= http://www.bsdconsulting.no/tools/
-EXTRACT_SUFX= .tgz
MAINTAINER= anders@FreeBSD.org
COMMENT= Near-realtime log monitoring tool, sends alerts on hits and misses
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
RUN_DEPENDS= p5-Config-IniFiles>=0:${PORTSDIR}/devel/p5-Config-IniFiles \
p5-Mail-Sendmail>=0:${PORTSDIR}/mail/p5-Mail-Sendmail \
p5-File-Tail>=0:${PORTSDIR}/devel/p5-File-Tail
+USES= perl5 tar:tgz
NO_BUILD= yes
-USES= perl5
-NO_STAGE= yes
+PORTDOCS= README TODO
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
do-install:
- ${INSTALL} -d -m 0755 ${PREFIX}/${PORTNAME}
- ${INSTALL_SCRIPT} ${WRKSRC}/lmon.pl ${PREFIX}/${PORTNAME}/
- ${INSTALL_SCRIPT} ${WRKSRC}/control.pl ${PREFIX}/${PORTNAME}/
- ${INSTALL_DATA} ${WRKSRC}/examples/control.cfg ${PREFIX}/${PORTNAME}/control.cfg.sample
+ @${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKSRC}/lmon.pl ${WRKSRC}/control.pl \
+ ${STAGEDIR}${PREFIX}/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/examples/control.cfg \
+ ${STAGEDIR}${PREFIX}/${PORTNAME}/control.cfg.sample
@${REINPLACE_CMD} -E -e "s@^(user=).*@\1\"root\"@;s@^(lmonhome=).*@\1\"${PREFIX}/${PORTNAME}\"@" ${WRKSRC}/examples/lmon.init
- ${INSTALL_SCRIPT} ${WRKSRC}/examples/lmon.init ${PREFIX}/etc/rc.d/lmon.sh.sample
-.if !defined(NOPORTDOCS)
- ${INSTALL} -d -m 0755 ${DOCSDIR}
-.for f in LICENSE README TODO
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/
-.endfor
-.endif
- ${INSTALL} -d -m 0755 ${EXAMPLESDIR}
- ${INSTALL_DATA} ${WRKSRC}/examples/*.rules ${EXAMPLESDIR}/
- @${CAT} ${PKGMESSAGE}
+ ${INSTALL_SCRIPT} ${WRKSRC}/examples/lmon.init \
+ ${STAGEDIR}${PREFIX}/etc/rc.d/lmon.sh.sample
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.rules ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.mk>
diff --git a/sysutils/lmon/pkg-plist b/sysutils/lmon/pkg-plist
index 72f76698adfc..b2e45b158382 100644
--- a/sysutils/lmon/pkg-plist
+++ b/sysutils/lmon/pkg-plist
@@ -2,13 +2,4 @@ etc/rc.d/lmon.sh.sample
lmon/control.cfg.sample
lmon/control.pl
lmon/lmon.pl
-%%EXAMPLESDIR%%/ciss-messages.rules
-%%EXAMPLESDIR%%/squid-times.rules
-%%EXAMPLESDIR%%/jboss.rules
-%%EXAMPLESDIR%%/messages.rules
-@dirrm %%EXAMPLESDIR%%
@dirrmtry lmon
-%%PORTDOCS%%%%DOCSDIR%%/LICENSE
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTDOCS%%@dirrm %%DOCSDIR%%