<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/cdf1287c9bdf0a247d4e268cb876c3c4e437ad70">https://github.com/macports/macports-ports/commit/cdf1287c9bdf0a247d4e268cb876c3c4e437ad70</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new cdf1287c9bd metabase: new port
</span>cdf1287c9bd is described below
<span style='display:block; white-space:pre;color:#808000;'>commit cdf1287c9bdf0a247d4e268cb876c3c4e437ad70
</span>Author: slashapp <slashapp@gmail.com>
AuthorDate: Sat Aug 19 09:34:48 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> metabase: new port
</span>---
databases/metabase/Portfile | 142 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 142 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/databases/metabase/Portfile b/databases/metabase/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7e2d9f5a713
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/databases/metabase/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,142 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup java 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name metabase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 0.47.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories databases java
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {gmail.com:slashapp @slashapp} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://www.metabase.com
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Metabase is an open-source business intelligence platform.\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ You can use Metabase to ask questions about your data,\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or embed Metabase in your app to let your customers explore\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ their data on their own.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description ${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms {darwin any}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://downloads.metabase.com/v${version}/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_jar ${name}.jar
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distfiles ${metabase_jar}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 e9001956f7b0646411e77988d9ae539127bce136 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 9bf03a464163971196bec306590041e8f571f24e1d5a34695363f0dea1eba809 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 325002691
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+java.version 11+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+java.fallback openjdk11
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extract {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_wrapper ${prefix}/etc/LaunchDaemons/org.macports.${name}/${name}.wrapper
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_exec_dir ${prefix}/libexec/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_home_dir ${prefix}/var/lib/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_log_dir ${prefix}/var/log/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_run_dir ${prefix}/var/run/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_db_dir ${prefix}/var/db/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_exec ${metabase_exec_dir}/${metabase_jar}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_log ${metabase_log_dir}/${name}.log
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_pid ${metabase_run_dir}/${name}.pid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_host 127.0.0.1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_port 3000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_user metabase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_group metabase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_dir_list [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_exec_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_home_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_log_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_run_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_db_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set metabase_exec_list [list \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${distpath}/${metabase_jar}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+foreach d ${metabase_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot.keepdirs-append ${destroot}${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d ${metabase_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d -m 0755 -g ${metabase_group} -o ${metabase_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f ${metabase_exec_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 -g ${metabase_group} -o ${metabase_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${f} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${metabase_exec_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-deactivate {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Cleanup all metabase-created files, which are significant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach d ${metabase_dir_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [file exists ${d}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "post-deactivate: dir exists, deleting: ${d}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete -force ${d}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_info "post-deactivate: dir doesn't exist, skipping delete: ${d}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+add_users ${metabase_user} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ group=${metabase_group} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ home=${metabase_home_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shell=/bin/sh \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ realname=metabase
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.create yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Enable additional logging, for diagnostic purposes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.logevents yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.user ${metabase_user}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.group ${metabase_group}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note: To avoid breakage when a Java port is updated/removed, use 'java_home' to select at runtime
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# java_home version filter not support wildcards
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set java_version [regsub {[^0-9.]} ${java.version} ""]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.init "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export JAVA_HOME=\$(/usr/libexec/java_home --failfast --version ${java_version} 2>/dev/null || /usr/libexec/java_home)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export MB_PLUGINS_DIR=${metabase_exec_dir}/plugins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export MB_DB_FILE=${metabase_db_dir}/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export MB_JETTY_HOST=${metabase_host}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+export MB_JETTY_PORT=${metabase_port}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.start \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\${JAVA_HOME}/bin/java -jar ${metabase_exec}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.stop \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "kill \$(cat ${metabase_pid})"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.logfile \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${metabase_log}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.pidfile \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ manual ${metabase_pid}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes-append "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To configure the metabase service, edit environment variables as follows:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - Read document at https://www.metabase.com/docs/latest/configuring-metabase/environment-variables
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - \$ sudo vi ${metabase_wrapper}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Once the service is enabled, metabase will:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - Listen by default on: http://${metabase_host}:${metabase_port}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ - Write logs to: ${metabase_log}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.url "https://www.metabase.com/start/oss/jar"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+livecheck.regex /v(\[0-9.\]+)/${metabase_jar}
</span></pre><pre style='margin:0'>
</pre>