1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

databases/metabase: (New) Simple and powerful analytics tool that supports multiple data stores

PR:		257304
This commit is contained in:
Daniel Morante 2021-08-01 05:27:19 +08:00 committed by Li-Wen Hsu
parent 577873f6aa
commit 71a09abcf5
No known key found for this signature in database
GPG Key ID: 82B261B14D3BC7AF
7 changed files with 167 additions and 0 deletions

View File

@ -192,6 +192,7 @@
SUBDIR += mdbx
SUBDIR += mdcached
SUBDIR += memcached
SUBDIR += metabase
SUBDIR += mongodb-tools
SUBDIR += mongodb36
SUBDIR += mongodb36-tools

View File

@ -0,0 +1,41 @@
PORTNAME= metabase
DISTVERSIONPREFIX= v
DISTVERSION= 0.40.1
CATEGORIES= databases java
MASTER_SITES= https://downloads.metabase.com/${DISTVERSIONPREFIX}${PORTVERSION}/
DISTNAME= ${PORTNAME}
EXTRACT_SUFX= .jar
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
EXTRACT_ONLY=
MAINTAINER= daniel@morante.net
COMMENT= Simple and powerful analytics tool that supports multiple data stores
LICENSE= AGPLv3
USE_JAVA= yes
JAVA_RUN= yes
USE_RC_SUBR= ${PORTNAME}
NO_ARCH= yes
NO_BUILD= yes
SUB_FILES= pkg-message
SUB_LIST+= PORTNAME=${PORTNAME} \
METABASEDATADIR=/var/db/${PORTNAME} \
METABASE_USER=${USERS} \
METABASE_GROUP=${GROUPS} \
JAVA_HOME=${JAVA_HOME}
USERS= www
GROUPS= www
PLIST_FILES= libexec/${PORTNAME}.jar "@sample etc/${PORTNAME}.conf.sample"
do-install:
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}.jar \
${STAGEDIR}${PREFIX}/libexec/${PORTNAME}.jar
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf \
${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1626738677
SHA256 (metabase-0.40.1/metabase.jar) = 972babb2ce60740729ba56323188bdf998e417dc1d9bac5642d7a429e4a793b1
SIZE (metabase-0.40.1/metabase.jar) = 270293188

View File

@ -0,0 +1,26 @@
# Metabase configuration file
#
# See https://www.metabase.com/docs/latest/operations-guide/start.html
# for a full listing of all configurable options.
# User password complexity and min length, <weak|normal|strong>
#MB_PASSWORD_COMPLEXITY=normal
#MB_PASSWORD_LENGTH=10
# By default Metabase will listen on localhost on port 3000.
#MB_JETTY_HOST=0.0.0.0
#MB_JETTY_PORT=3000
# Default config database is built-in H2. Use any one of <postgres|mysql|h2>
#MB_DB_TYPE=postgres
# If using a diffrent config database specify the name, port, user, pass, and host
#MB_DB_DBNAME=metabase
#MB_DB_PORT=5432
#MB_DB_USER=metabase
#MB_DB_PASS=metabase
#MB_DB_HOST=localhost
# Show emoji in logs <true|false>
#MB_EMOJI_IN_LOGS=true

View File

@ -0,0 +1,69 @@
#!/bin/sh
#
# PROVIDE: %%PORTNAME%%
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%
# %%PORTNAME%%_enable="YES"
#
# %%PORTNAME%%_enable (bool): Set to YES to enable %%PORTNAME%%
# Default: NO
# %%PORTNAME%%_env_file (str): %%PORTNAME%% configration file
# Default: %%PREFIX%%/etc/%%PORTNAME%%.conf
# %%PORTNAME%%_user (str): %%PORTNAME%% daemon user
# Default: %%METABASE_USER%%
# %%PORTNAME%%_group (str): %%PORTNAME%% daemon group
# Default: %%METABASE_GROUP%%
. /etc/rc.subr
name="%%PORTNAME%%"
rcvar=%%PORTNAME%%_enable
load_rc_config $name
: ${%%PORTNAME%%_enable:="NO"}
: ${%%PORTNAME%%_user:="%%METABASE_USER%%"}
: ${%%PORTNAME%%_group:="%%METABASE_GROUP%%"}
: ${%%PORTNAME%%_flags=""}
: ${%%PORTNAME%%_java_opts=""}
: ${%%PORTNAME%%_java_home="%%JAVA_HOME%%"}
: ${%%PORTNAME%%_env_file:="%%PREFIX%%/etc/${name}.conf"}
: ${%%PORTNAME%%_log:="/var/log/${name}.log"}
: ${%%PORTNAME%%_pidfile:="/var/run/${name}.pid"}
: ${%%PORTNAME%%_datadir:="%%METABASEDATADIR%%"}
required_files=${%%PORTNAME%%_env_file}
java_command="${%%PORTNAME%%_java_home}/bin/java"
procname="${java_command}"
pidfile=${%%PORTNAME%%_pidfile}
command=/usr/sbin/daemon
command_args="-f -t ${name} -p ${pidfile} -o ${%%PORTNAME%%_log} ${java_command} ${%%PORTNAME%%_java_opts} -jar %%PREFIX%%/libexec/%%PORTNAME%%.jar ${%%PORTNAME%%_flags}"
start_precmd="%%PORTNAME%%_precmd"
%%PORTNAME%%_chdir=${%%PORTNAME%%_datadir}
%%PORTNAME%%_precmd()
{
if [ ! -d "${%%PORTNAME%%_datadir}/." ]; then
%%PORTNAME%%_create_datadir || return 1
fi
install -o ${%%PORTNAME%%_user} /dev/null ${%%PORTNAME%%_pidfile}
if [ ! -f "${%%PORTNAME%%_log}" ]; then
touch "${%%PORTNAME%%_log}"
chown "${%%PORTNAME%%_user}:${%%PORTNAME%%_group}" "${%%PORTNAME%%_log}"
chmod 640 "${%%PORTNAME%%_log}"
fi
}
%%PORTNAME%%_create_datadir()
{
echo "Creating data directory"
eval mkdir -p ${%%PORTNAME%%_datadir}
[ $? -eq 0 ] && chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_datadir}
}
run_rc_command "$1"

View File

@ -0,0 +1,18 @@
[
{ type: install
message: <<EOM
To configure %%PORTNAME%% please edit:
%%PREFIX%%/etc/%%PORTNAME%%.conf
To run %%PORTNAME%% at startup, enable it
in your /etc/rc.conf:
sysrc %%PORTNAME%%_enable="YES"
To start %%PORTNAME%%:
service %%PORTNAME%% start
EOM
}
]

View File

@ -0,0 +1,9 @@
Metabase is an open source business intelligence tool. It lets you ask
questions about your data and displays answers in formats that
make sense, whether that's a bar graph or a detailed table.
Your questions can be saved for later, making it easy to come back to them,
or you can group questions into great looking dashboards. Metabase also
makes it easy to share questions and dashboards with the rest of your team.
WWW: https://metabase.com/