aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorlme <lme@FreeBSD.org>2018-01-03 23:02:39 +0800
committerlme <lme@FreeBSD.org>2018-01-03 23:02:39 +0800
commit7e9dba7eba070d790a19cc0e680c81617c5d9523 (patch)
treeb71b74b5ce4dc328cf6da01cfe1f9f736e4434fc /net-mgmt
parent618f7fb73d5af3291b61c4a600132b458ec55f68 (diff)
downloadfreebsd-ports-graphics-7e9dba7eba070d790a19cc0e680c81617c5d9523.tar.gz
freebsd-ports-graphics-7e9dba7eba070d790a19cc0e680c81617c5d9523.tar.zst
freebsd-ports-graphics-7e9dba7eba070d790a19cc0e680c81617c5d9523.zip
net-mgmt/icingaweb2:
- Install icingacli to ${PREFIX}/bin and patch it to make it usable. Now you can configure Icinga Web 2 with it and can use the embedded PHP web server. - Bump PORTREVISION MFH: 2018Q1
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/icingaweb2/Makefile13
-rw-r--r--net-mgmt/icingaweb2/pkg-plist1
2 files changed, 13 insertions, 1 deletions
diff --git a/net-mgmt/icingaweb2/Makefile b/net-mgmt/icingaweb2/Makefile
index 5f13820ddba..de66502653f 100644
--- a/net-mgmt/icingaweb2/Makefile
+++ b/net-mgmt/icingaweb2/Makefile
@@ -3,6 +3,7 @@
PORTNAME= icingaweb2
DISTVERSIONPREFIX= v
DISTVERSION= 2.5.0
+PORTREVISION= 1
CATEGORIES= net-mgmt www
MAINTAINER= lme@FreeBSD.org
@@ -42,6 +43,11 @@ MYSQL_USE= PHP=pdo_mysql
LDAP_USE= PHP=ldap
PDF_RUN_DEPENDS= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick
+post-patch:
+ ${REINPLACE_CMD} 's%\(/etc/icingaweb2\)%${PREFIX}\1%g' \
+ ${WRKSRC}/library/Icinga/Application/ApplicationBootstrap.php
+ ${REINPLACE_CMD} 's%readlink[^)]*)%"${PREFIX}/bin/php"%g' \
+ ${WRKSRC}/application/clicommands/WebCommand.php
do-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/bash_completion.d/
${INSTALL_DATA} ${WRKSRC}/etc/bash_completion.d/icingacli \
@@ -51,11 +57,16 @@ do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}
(cd ${WRKSRC} && \
${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR})
- ${CHMOD} 755 ${STAGEDIR}/${WWWDIR}/bin/icingacli
+ ${CHMOD} 755 ${STAGEDIR}${WWWDIR}/bin/icingacli
+ ${RLN} ${STAGEDIR}${WWWDIR}/bin/icingacli ${STAGEDIR}${PREFIX}/bin/icingacli
${MKDIR} ${STAGEDIR}${ETCDIR}
.for webserver in apache nginx
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${webserver}
+ # ICINGAWEB_CONFIGDIR is set to /nonexistent to allow staging as user.
+ # Once installed, ${ETCDIR} is not world-readable, so point icingacli to
+ # a non existing directory. The config files are generated correctly anyway.
(cd ${STAGEDIR}${WWWDIR} && \
+ ICINGAWEB_CONFIGDIR=/nonexistent \
./bin/icingacli setup config webserver ${webserver} --path=/icingaweb2 \
--root=${WWWDIR}/public --config=${ETCDIR} \
--file=${STAGEDIR}${EXAMPLESDIR}/${webserver}/icingaweb2.conf)
diff --git a/net-mgmt/icingaweb2/pkg-plist b/net-mgmt/icingaweb2/pkg-plist
index de999c9b278..ca98fdbbebb 100644
--- a/net-mgmt/icingaweb2/pkg-plist
+++ b/net-mgmt/icingaweb2/pkg-plist
@@ -1,3 +1,4 @@
+bin/icingacli
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/apache/icingaweb2.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bash_completion.d/icingacli
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/nginx/icingaweb2.conf