aboutsummaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2018-06-01 23:03:18 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2018-06-01 23:03:18 +0000
commit371bc432106191a02d5022521050838e40c59b1b (patch)
treed6f0741c40b3f79b6f0b9adb21d8bf634b79d412 /textproc
parent251223cc64f44fa94a5794a0dfea5f4a4a503a49 (diff)
downloadports-371bc432106191a02d5022521050838e40c59b1b.tar.gz
ports-371bc432106191a02d5022521050838e40c59b1b.zip
Notes
Diffstat (limited to 'textproc')
-rw-r--r--textproc/kibana46/Makefile32
-rw-r--r--textproc/kibana46/files/kibana.in42
2 files changed, 68 insertions, 6 deletions
diff --git a/textproc/kibana46/Makefile b/textproc/kibana46/Makefile
index fe2d72ee3c82..a0a08148e643 100644
--- a/textproc/kibana46/Makefile
+++ b/textproc/kibana46/Makefile
@@ -1,15 +1,35 @@
# Created by: Sergey Kozlov <kozlov.sergey.404@gmail.com>
# $FreeBSD$
+PORTNAME= kibana
PORTVERSION= 4.6.4
+DISTVERSIONSUFFIX= -linux-x86
+CATEGORIES= textproc www
+MASTER_SITES= https://download.elastic.co/kibana/kibana/ \
+ http://download.elastic.co/kibana/kibana/
PKGNAMESUFFIX= 46
-MASTERDIR= ${.CURDIR}/../kibana45
-PKGDIR= ${.CURDIR}
-DISTINFO_FILE= ${.CURDIR}/distinfo
-
-RUN_DEPENDS= node6>=v6.9.0:www/node6
DEPRECATED= End of Life was 2018-02-28
EXPIRATION_DATE= 2018-07-09
-.include "${MASTERDIR}/Makefile"
+MAINTAINER= kozlov.sergey.404@gmail.com
+COMMENT= Browser based analytics and search interface to ElasticSearch
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= node6>=6.9.0:www/node6
+
+NO_BUILD= yes
+NO_ARCH= yes
+WWWDIR= ${PREFIX}/www/${PORTNAME}${PKGNAMESUFFIX}
+USE_RC_SUBR= ${PORTNAME}
+
+do-install:
+ ${CP} ${WRKSRC}/config/kibana.yml ${STAGEDIR}${PREFIX}/etc/kibana.yml.sample
+ ${MKDIR} ${STAGEDIR}${WWWDIR}
+ cd ${WRKSRC} && \
+ ${RM} -r bin config node && \
+ ${RM} -r optimize/* && \
+ ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
+
+.include <bsd.port.mk>
diff --git a/textproc/kibana46/files/kibana.in b/textproc/kibana46/files/kibana.in
new file mode 100644
index 000000000000..b309bb3c1e3d
--- /dev/null
+++ b/textproc/kibana46/files/kibana.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: kibana
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name=kibana
+rcvar=kibana_enable
+
+load_rc_config $name
+
+: ${kibana_enable:="NO"}
+: ${kibana_config:="%%PREFIX%%/etc/kibana.yml"}
+: ${kibana_user:="www"}
+: ${kibana_group:="www"}
+: ${kibana_log:="/var/log/kibana.log"}
+
+required_files="${kibana_config}"
+pidfile="/var/run/${name}/${name}.pid"
+start_precmd="kibana_precmd"
+procname="%%LOCALBASE%%/bin/node"
+command="/usr/sbin/daemon"
+command_args="-f -p ${pidfile} env BABEL_DISABLE_CACHE=1 ${procname} %%WWWDIR%%/src/cli serve --config ${kibana_config} --log-file ${kibana_log}"
+
+kibana_precmd()
+{
+ if [ ! -d $(dirname ${pidfile}) ]; then
+ mkdir $(dirname ${pidfile})
+ chown ${kibana_user}:${kibana_group} $(dirname ${pidfile})
+ fi
+
+ if [ ! -f ${kibana_log} ]; then
+ install -o ${kibana_user} -g ${kibana_group} -m 640 /dev/null ${kibana_log}
+ fi
+}
+
+run_rc_command "$1"