pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/metabase



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Thu Aug 29 15:00:26 UTC 2024

Added Files:
        pkgsrc/www/metabase: DESCR Makefile PLIST distinfo
        pkgsrc/www/metabase/files: log4j2.xml metabase.sh

Log Message:
www/metabase: import metabase-0.50.22

Metabase is the open source tool that makes everyone feel like
they've got data superpowers.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/www/metabase/DESCR pkgsrc/www/metabase/Makefile \
    pkgsrc/www/metabase/PLIST pkgsrc/www/metabase/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/metabase/files/log4j2.xml \
    pkgsrc/www/metabase/files/metabase.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/www/metabase/DESCR
diff -u /dev/null pkgsrc/www/metabase/DESCR:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/DESCR   Thu Aug 29 15:00:26 2024
@@ -0,0 +1,2 @@
+Metabase is the open source tool that makes everyone feel like
+they've got data superpowers.
Index: pkgsrc/www/metabase/Makefile
diff -u /dev/null pkgsrc/www/metabase/Makefile:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/Makefile        Thu Aug 29 15:00:26 2024
@@ -0,0 +1,69 @@
+# $NetBSD: Makefile,v 1.1 2024/08/29 15:00:26 ryoon Exp $
+
+DISTNAME=      metabase
+PKGNAME=       ${DISTNAME}-0.50.22
+CATEGORIES=    www
+MASTER_SITES=  https://downloads.metabase.com/v${PKGVERSION_NOREV:S/rc/-RC/}/
+DIST_SUBDIR=   ${PKGNAME_NOREV}
+EXTRACT_SUFX=  .jar
+
+MAINTAINER=    ryoon%NetBSD.org@localhost
+HOMEPAGE=      https://www.metabase.com/
+COMMENT=       Business intelligence and analytics web application
+LICENSE=       gnu-agpl-v3
+
+WRKSRC=                ${WRKDIR}
+
+NO_BUILD=      yes
+USE_LANGUAGES= # none
+USE_JAVA=      run
+USE_JAVA2=     11
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=           VARBASE
+
+METABASE_USER?=                metabase
+METABASE_GROUP?=       metabase
+PKG_GROUPS=            ${METABASE_GROUP}
+PKG_USERS=             ${METABASE_USER}:${METABASE_GROUP}
+PKG_GROUPS_VARS+=      METABASE_GROUP
+PKG_USERS_VARS+=       METABASE_USER
+PKG_HOME.metabase=     ${METABASE_HOME}
+PKG_SHELL.metabase=    ${SH}
+
+PKG_SYSCONFDIR.metabase=       ${METABASE_HOME}/conf
+OWN_DIRS_PERMS+=               ${PKG_SYSCONFDIR.metabase} ${METABASE_USER} ${METABASE_GROUP} 0755
+
+EGDIR=                 ${METABASE_HOME}/examples
+CONF_FILES_PERMS+=     ${EGDIR}/log4j2.xml ${PKG_SYSCONFDIR.metabase}/log4j2.xml \
+                       ${METABASE_USER} ${METABASE_GROUP} 0640
+
+OWN_DIRS_PERMS+=       ${VARBASE}/log/metabase ${METABASE_USER} ${METABASE_GROUP} 0755
+
+RCD_SCRIPTS=   metabase
+METABASE_HOME= ${PREFIX}/share/metabase
+FILES_SUBST+=  METABASE_HOME=${METABASE_HOME}
+FILES_SUBST+=  JAVA_HOME=${PKG_JAVA_HOME}
+FILES_SUBST+=  METABASE_USER=${METABASE_USER}
+
+SUBST_CLASSES+=                var
+SUBST_STAGE.var=       pre-configure
+SUBST_MESSAGE.var=     Setting VARBASE
+SUBST_FILES.var=       log4j2.xml
+SUBST_VARS.var=                VARBASE
+
+INSTALLATION_DIRS+=    ${METABASE_HOME}/examples
+
+pre-patch:
+       ${INSTALL_DATA} ${FILESDIR}/log4j2.xml \
+               ${WRKSRC}/log4j2.xml
+
+do-install:
+       ${INSTALL_DATA} ${WRKSRC}/metabase.jar \
+               ${DESTDIR}${METABASE_HOME}
+       ${INSTALL_DATA} ${WRKSRC}/log4j2.xml \
+               ${DESTDIR}${METABASE_HOME}/examples
+
+.include "../../mk/java-vm.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/www/metabase/PLIST
diff -u /dev/null pkgsrc/www/metabase/PLIST:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/PLIST   Thu Aug 29 15:00:26 2024
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2024/08/29 15:00:26 ryoon Exp $
+share/metabase/examples/log4j2.xml
+share/metabase/metabase.jar
Index: pkgsrc/www/metabase/distinfo
diff -u /dev/null pkgsrc/www/metabase/distinfo:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/distinfo        Thu Aug 29 15:00:26 2024
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2024/08/29 15:00:26 ryoon Exp $
+
+BLAKE2s (metabase-0.50.22/metabase.jar) = dabf585ab88b8b46918bf08cc526dc941e08dd24169cececdcfd2fb32f5f1fe9
+SHA512 (metabase-0.50.22/metabase.jar) = 7890414f3a23ff113437130e8dcd5872a5d7d9eb017bd5899196b9d10efbcb1695236a9c73f946945df204c38f1b5e8674eea00356d33b05dde1c4eb4d023251
+Size (metabase-0.50.22/metabase.jar) = 389025041 bytes

Index: pkgsrc/www/metabase/files/log4j2.xml
diff -u /dev/null pkgsrc/www/metabase/files/log4j2.xml:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/files/log4j2.xml        Thu Aug 29 15:00:26 2024
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="DEBUG">
+  <Appenders>
+    <File name="LogToFile" fileName="@VARBASE@/log/metabase/metabase.log">
+      <PatternLayout>
+        <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>
+      </PatternLayout>
+    </File>
+  </Appenders>
+
+  <Loggers>
+    <Logger name="metabase.sync" level="TRACE"/>
+    <Logger name="metabase.plugins" level="DEBUG"/>
+    <Logger name="metabase.server.middleware" level="DEBUG"/>
+    <Logger name="metabase.query-processor.async" level="DEBUG"/>
+    <Logger name="com.mchange" level="ERROR"/>
+    <Logger name="metabase" level="INFO"/>
+
+    <Root>
+      <AppenderRef ref="LogToFile"/>
+    </Root>
+
+  </Loggers>
+</Configuration>
Index: pkgsrc/www/metabase/files/metabase.sh
diff -u /dev/null pkgsrc/www/metabase/files/metabase.sh:1.1
--- /dev/null   Thu Aug 29 15:00:26 2024
+++ pkgsrc/www/metabase/files/metabase.sh       Thu Aug 29 15:00:26 2024
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# $NetBSD: metabase.sh,v 1.1 2024/08/29 15:00:26 ryoon Exp $
+#
+# PROVIDE: metabase
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+ 
+name="metabase"
+rcvar=$name
+pidfile="@VARBASE@/run/${name}.pid"
+start_cmd="metabase_start"
+stop_cmd="metabase_stop"
+status_cmd="metabase_status"
+extra_commands="status"
+
+JAVA_OPTS="${JAVA_OPTS} -XX:+IgnoreUnrecognizedVMOptions"
+JAVA_OPTS="${JAVA_OPTS} -Dfile.encoding=UTF-8"
+JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configurationFile=file:/usr/pkg/share/metabase/conf/log4j2.xml"
+JAVA_OPTS="${JAVA_OPTS} -XX:+CrashOnOutOfMemoryError"
+JAVA_OPTS="${JAVA_OPTS} -server"
+
+#export MB_DB_TYPE=postgres
+#export MB_DB_DBNAME=metabase
+#export MB_DB_PORT=5432
+#export MB_DB_USER=metabase_user
+#export MB_DB_PASS=metabase_password
+#export MB_DB_HOST=localhost
+#export MB_EMOJI_IN_LOGS=false
+
+metabase_start()
+{
+       eval "export -- \$${name}_env"
+       cd @METABASE_HOME@/conf
+       @SU@ @METABASE_USER@ -c \
+               "@JAVA_HOME@/bin/java ${JAVA_OPTS} \
+               -jar @METABASE_HOME@/metabase.jar" &
+       echo $! > ${pidfile}
+}
+
+metabase_stop()
+{
+       kill ${sig_stop} `cat ${pidfile}`
+       rm ${pidfile}
+}
+
+metabase_status()
+{
+       if test -f ${pidfile}; then
+               echo "${name} is running as pid `cat ${pidfile}`."
+       else
+               echo "${name} is not running."
+       fi
+
+}
+
+load_rc_config $name
+run_rc_command "$1"



Home | Main Index | Thread Index | Old Index