[arch-commits] Commit in (4 files)

Justin Kromlinger hashworks at gemini.archlinux.org
Fri Dec 31 15:35:44 UTC 2021


    Date: Friday, December 31, 2021 @ 15:35:44
  Author: hashworks
Revision: 1090379

Initial commit

Added:
  opensearch-dashboards-anomaly-detection-plugin/
  opensearch-dashboards-anomaly-detection-plugin/repos/
  opensearch-dashboards-anomaly-detection-plugin/trunk/
  opensearch-dashboards-anomaly-detection-plugin/trunk/PKGBUILD

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Added: opensearch-dashboards-anomaly-detection-plugin/trunk/PKGBUILD
===================================================================
--- opensearch-dashboards-anomaly-detection-plugin/trunk/PKGBUILD	                        (rev 0)
+++ opensearch-dashboards-anomaly-detection-plugin/trunk/PKGBUILD	2021-12-31 15:35:44 UTC (rev 1090379)
@@ -0,0 +1,55 @@
+# Maintainer: Justin Kromlinger <hashworks at archlinux.org>
+
+pkgname='opensearch-dashboards-anomaly-detection-plugin'
+_pluginname='anomaly-detection-dashboards-plugin'
+pkgver=1.2.0.0
+_dashboardsver=1.2.0
+pkgrel=1
+pkgdesc='OpenSearch Dashboards Anomaly Detection Plugin'
+url='https://opensearch.org/docs/latest/monitoring-plugins/ad/index/'
+arch=('x86_64')
+license=('Apache')
+depends=('opensearch-dashboards')
+makedepends=('yarn' 'python' 'git')
+options=('!strip' 'emptydirs')
+source=(
+  "git+https://github.com/opensearch-project/${_pluginname}.git#tag=${pkgver}"
+  "git+https://github.com/opensearch-project/OpenSearch-Dashboards.git#tag=${_dashboardsver}"
+)
+sha256sums=(
+  'SKIP'
+  'SKIP'
+)
+
+prepare() {
+  nodeVersion="$(node -v)"
+  # Yes, you support this version. You just don't know it yet.
+  sed -i "s/    \"node\": \"[0-9\.]*\",/    \"node\": \"${nodeVersion:1}\",/" \
+    "${_pluginname}/package.json" \
+    "OpenSearch-Dashboards/package.json"
+}
+
+build() {
+  mv "${_pluginname}" "OpenSearch-Dashboards/plugins"
+  cd "OpenSearch-Dashboards/plugins/${_pluginname}"
+  yarn osd bootstrap
+  yarn plugin-helpers build --skip-archive # `yarn build` will always create the ZIP
+}
+
+check() {
+  cd "OpenSearch-Dashboards/plugins/${_pluginname}"
+  yarn test:jest
+}
+
+package() {
+  cd "${srcdir}/OpenSearch-Dashboards/plugins/${_pluginname}"
+
+  install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+  install -dm755 "${pkgdir}/usr/share/opensearch-dashboards/plugins/"
+
+  cp -r "build/opensearch-dashboards/"* "${pkgdir}/usr/share/opensearch-dashboards/plugins/"
+
+  find "${pkgdir}/usr/share/opensearch-dashboards/plugins" -type d -empty -delete
+}
+
+# vim: ts=2 sw=2 et:



More information about the arch-commits mailing list