View | Details | Raw Unified | Return to bug 257304 | Differences between
and this patch

Collapse All | Expand All

(-)b/databases/metabase/Makefile (+41 lines)
Added Link Here
1
PORTNAME=	metabase
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	0.40.1
4
CATEGORIES=	databases java
5
MASTER_SITES=	https://downloads.metabase.com/${DISTVERSIONPREFIX}${PORTVERSION}/
6
DISTNAME=	${PORTNAME}
7
EXTRACT_SUFX=	.jar
8
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
9
EXTRACT_ONLY=
10
11
MAINTAINER=	daniel@morante.net
12
COMMENT=	Simple and powerful analytics tool that supports multiple data stores
13
14
LICENSE=	AGPLv3
15
16
USE_JAVA=	yes
17
JAVA_RUN=	yes
18
USE_RC_SUBR=	${PORTNAME}
19
20
NO_ARCH=	yes
21
NO_BUILD=	yes
22
23
SUB_FILES=	pkg-message
24
SUB_LIST+=	PORTNAME=${PORTNAME} \
25
			METABASEDATADIR=/var/db/${PORTNAME} \
26
			METABASE_USER=${USERS} \
27
			METABASE_GROUP=${GROUPS} \
28
			JAVA_HOME=${JAVA_HOME}
29
30
USERS=	www
31
GROUPS=	www
32
33
PLIST_FILES?=	bin/${PORTNAME}.jar "@sample etc/${PORTNAME}.conf.sample"
34
35
do-install:
36
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}.jar \
37
		${STAGEDIR}${PREFIX}/bin/${PORTNAME}.jar
38
	${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf \
39
		${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
40
41
.include <bsd.port.mk>
(-)b/databases/metabase/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1626738677
2
SHA256 (metabase-0.40.1/metabase.jar) = 972babb2ce60740729ba56323188bdf998e417dc1d9bac5642d7a429e4a793b1
3
SIZE (metabase-0.40.1/metabase.jar) = 270293188
(-)b/databases/metabase/files/metabase.conf (+26 lines)
Added Link Here
1
# Metabase configuration file
2
#
3
# See https://www.metabase.com/docs/latest/operations-guide/start.html
4
# for a full listing of all configurable options.
5
6
# User password complexity and min length, <weak|normal|strong>
7
#MB_PASSWORD_COMPLEXITY=normal
8
#MB_PASSWORD_LENGTH=10
9
10
# By default Metabase will listen on localhost on port 3000.
11
#MB_JETTY_HOST=0.0.0.0
12
#MB_JETTY_PORT=3000
13
14
# Default config database is built-in H2.  Use any one of <postgres|mysql|h2>
15
#MB_DB_TYPE=postgres
16
17
# If using a diffrent config database specify the name, port, user, pass, and host
18
#MB_DB_DBNAME=metabase
19
#MB_DB_PORT=5432
20
#MB_DB_USER=metabase
21
#MB_DB_PASS=metabase
22
#MB_DB_HOST=localhost
23
24
# Show emoji in logs <true|false>
25
#MB_EMOJI_IN_LOGS=true
26
(-)b/databases/metabase/files/metabase.in (+69 lines)
Added Link Here
1
#!/bin/sh
2
3
#
4
# PROVIDE: %%PORTNAME%%
5
# REQUIRE: LOGIN
6
# KEYWORD: shutdown
7
8
# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%
9
# %%PORTNAME%%_enable="YES"
10
#
11
# %%PORTNAME%%_enable (bool): 	Set to YES to enable %%PORTNAME%%
12
#				Default: NO
13
# %%PORTNAME%%_env_file (str):	%%PORTNAME%% configration file
14
#				Default: %%PREFIX%%/etc/%%PORTNAME%%.conf
15
# %%PORTNAME%%_user (str):		%%PORTNAME%% daemon user
16
#				Default: %%METABASE_USER%%
17
# %%PORTNAME%%_group (str):		%%PORTNAME%% daemon group
18
#				Default: %%METABASE_GROUP%%
19
20
. /etc/rc.subr
21
22
name="%%PORTNAME%%"
23
rcvar=%%PORTNAME%%_enable
24
load_rc_config $name
25
26
: ${%%PORTNAME%%_enable:="NO"}
27
: ${%%PORTNAME%%_user:="%%METABASE_USER%%"}
28
: ${%%PORTNAME%%_group:="%%METABASE_GROUP%%"}
29
: ${%%PORTNAME%%_flags=""}
30
: ${%%PORTNAME%%_java_opts=""}
31
: ${%%PORTNAME%%_java_home="%%JAVA_HOME%%"}
32
: ${%%PORTNAME%%_env_file:="%%PREFIX%%/etc/${name}.conf"}
33
: ${%%PORTNAME%%_log:="/var/log/${name}.log"}
34
: ${%%PORTNAME%%_pidfile:="/var/run/${name}.pid"}
35
: ${%%PORTNAME%%_datadir:="%%METABASEDATADIR%%"}
36
37
required_files=${%%PORTNAME%%_env_file}
38
java_command="${%%PORTNAME%%_java_home}/bin/java"
39
procname="${java_command}"
40
pidfile=${%%PORTNAME%%_pidfile}
41
command=/usr/sbin/daemon
42
command_args="-f -t ${name} -p ${pidfile} -o ${%%PORTNAME%%_log} ${java_command} ${%%PORTNAME%%_java_opts} -jar %%PREFIX%%/bin/%%PORTNAME%%.jar ${%%PORTNAME%%_flags}"
43
start_precmd="%%PORTNAME%%_precmd"
44
45
%%PORTNAME%%_chdir=${%%PORTNAME%%_datadir}
46
47
%%PORTNAME%%_precmd()
48
{
49
	if [ ! -d "${%%PORTNAME%%_datadir}/." ]; then
50
		%%PORTNAME%%_create_datadir || return 1
51
	fi
52
53
	install -o ${%%PORTNAME%%_user} /dev/null ${%%PORTNAME%%_pidfile}
54
55
	if [ ! -f "${%%PORTNAME%%_log}" ]; then
56
		touch "${%%PORTNAME%%_log}"
57
		chown "${%%PORTNAME%%_user}:${%%PORTNAME%%_group}" "${%%PORTNAME%%_log}"
58
		chmod 640 "${%%PORTNAME%%_log}"
59
	fi
60
}
61
62
%%PORTNAME%%_create_datadir()
63
{
64
	echo "Creating data directory"
65
	eval mkdir -p ${%%PORTNAME%%_datadir}
66
	[ $? -eq 0 ] && chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_datadir}
67
}
68
69
run_rc_command "$1"
(-)b/databases/metabase/files/pkg-message.in (+18 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
To configure %%PORTNAME%% please edit:
5
%%PREFIX%%/etc/%%PORTNAME%%.conf
6
7
To run %%PORTNAME%% at startup, enable it
8
in your /etc/rc.conf:
9
10
sysrc %%PORTNAME%%_enable="YES"
11
12
To start %%PORTNAME%%:
13
14
service %%PORTNAME%% start
15
EOM
16
}
17
]
18
(-)b/databases/metabase/pkg-descr (+9 lines)
Added Link Here
1
Metabase is an open source business intelligence tool. It lets you ask
2
questions about your data and displays answers in formats that
3
make sense, whether that's a bar graph or a detailed table.
4
5
Your questions can be saved for later, making it easy to come back to them,
6
or you can group questions into great looking dashboards. Metabase also
7
makes it easy to share questions and dashboards with the rest of your team.
8
9
WWW: https://metabase.com/

Return to bug 257304