[arch-commits] Commit in (4 files)

Justin Kromlinger hashworks at gemini.archlinux.org
Thu Sep 1 17:17:42 UTC 2022


    Date: Thursday, September 1, 2022 @ 17:17:42
  Author: hashworks
Revision: 1290381

Initial commit

Added:
  opensearch-dashboards-notifications-plugin/
  opensearch-dashboards-notifications-plugin/repos/
  opensearch-dashboards-notifications-plugin/trunk/
  opensearch-dashboards-notifications-plugin/trunk/PKGBUILD

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

Added: opensearch-dashboards-notifications-plugin/trunk/PKGBUILD
===================================================================
--- opensearch-dashboards-notifications-plugin/trunk/PKGBUILD	                        (rev 0)
+++ opensearch-dashboards-notifications-plugin/trunk/PKGBUILD	2022-09-01 17:17:42 UTC (rev 1290381)
@@ -0,0 +1,55 @@
+# Maintainer: Justin Kromlinger <hashworks at archlinux.org>
+
+pkgname='opensearch-dashboards-notifications-plugin'
+_pluginname='notifications'
+pkgver=2.1.0.0
+_dashboardsver=2.1.0
+pkgrel=1
+pkgdesc='OpenSearch Dashboards Notifications Plugin'
+url='https://opensearch.org/docs/latest/notifications-plugin/index/'
+arch=('x86_64')
+license=('Apache')
+depends=("opensearch-dashboards=${_dashboardsver}" 'coffeescript')
+makedepends=('yarn' 'python' 'git' 'unzip')
+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}\",/" \
+    "OpenSearch-Dashboards/package.json"
+}
+
+build() {
+  mv "${_pluginname}/dashboards-${_pluginname}" "OpenSearch-Dashboards/plugins/${_pluginname}"
+  cd "OpenSearch-Dashboards/plugins/${_pluginname}"
+  yarn osd bootstrap
+  yarn build # --skip-archive breaks the build
+}
+
+check() {
+  cd "OpenSearch-Dashboards/plugins/${_pluginname}"
+  yarn test:jest
+}
+
+package() {
+  cd "${_pluginname}"
+  install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+
+  cd "${srcdir}/OpenSearch-Dashboards/plugins/${_pluginname}/build"
+  unzip "${_pluginname}-dashboards-${pkgver}.zip"
+
+  install -dm755 "${pkgdir}/usr/share/opensearch-dashboards/plugins/"
+
+  cp -r "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