1 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
3 pkgname='opensearch-dashboards-notifications-plugin'
4 _pluginname='notifications'
8 pkgdesc='OpenSearch Dashboards Notifications Plugin'
9 url='https://opensearch.org/docs/latest/notifications-plugin/index/'
12 depends=("opensearch-dashboards=${_dashboardsver}" 'coffeescript')
13 makedepends=('yarn' 'python' 'git' 'unzip')
14 options=('!strip' 'emptydirs')
16 "git+https://github.com/opensearch-project/${_pluginname}.git#tag=${pkgver}"
17 "git+https://github.com/opensearch-project/OpenSearch-Dashboards.git#tag=${_dashboardsver}"
23 nodeVersion="$(node -v)"
24 # Yes, you support this version. You just don't know it yet.
25 sed -i "s/ \"node\": \"[0-9\.]*\",/ \"node\": \"${nodeVersion:1}\",/" \
26 "OpenSearch-Dashboards/package.json"
30 mv "${_pluginname}/dashboards-${_pluginname}" "OpenSearch-Dashboards/plugins/${_pluginname}"
31 cd "OpenSearch-Dashboards/plugins/${_pluginname}"
33 yarn build # --skip-archive breaks the build
37 cd "OpenSearch-Dashboards/plugins/${_pluginname}"
43 install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
45 cd "${srcdir}/OpenSearch-Dashboards/plugins/${_pluginname}/build"
46 unzip "${_pluginname}-dashboards-${pkgver}.zip"
48 install -dm755 "${pkgdir}/usr/share/opensearch-dashboards/plugins/"
50 cp -r "opensearch-dashboards/"* "${pkgdir}/usr/share/opensearch-dashboards/plugins/"
52 find "${pkgdir}/usr/share/opensearch-dashboards/plugins" -type d -empty -delete