upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / opensearch-performance-analyzer-plugin / trunk / PKGBUILD
blob44fed2436790d5b69e3f36b76cab6729f1fd13d3
1 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
3 pkgname=opensearch-performance-analyzer-plugin
4 pkgver=2.6.0.0
5 pkgrel=1
6 _opensearchver=2.6.0
7 _jdkver=11
8 _rcaver="$(echo -n "${_opensearchver}" | sed 's/\.[0-9]\+$//')"
9 pkgdesc="OpenSearch Performance Analyzer Plugin"
10 arch=('x86_64')
11 url="https://opensearch.org/docs/latest/monitoring-plugins/pa"
12 license=('Apache')
13 depends=("opensearch=${_opensearchver}")
14 makedepends=("java-environment=${_jdkver}" 'unzip' 'git')
15 source=(
16   "${pkgname}-${pkgver}.tar.gz::https://github.com/opensearch-project/performance-analyzer/archive/${pkgver}.tar.gz"
17   "git+https://github.com/opensearch-project/performance-analyzer-rca.git#branch=${_rcaver}"
19 sha256sums=('b4a33a637e40d81d640bcc8e6a82db1419d78b0a599e28505ddaacfb12be0680'
20             'SKIP')
22 build() {
23   cd "performance-analyzer-${pkgver}"
24   export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
25   export PATH="/usr/lib/jvm/java-${_jdkver}-openjdk/bin:$PATH"
26   export GRADLE_OPTS="-Dbuild.snapshot=false -Dopensearch.version=${_opensearchver}"
27   # integTest (Reaper) requires JDK 14
28   ./gradlew assemble \
29     -Dperformance-analyzer-rca.build=true \
30     -Dperformance-analyzer-rca.branch=2.3 \
31     --exclude-task ":integTest" \
32     --exclude-task ":jacocoTestReport" \
33     --exclude-task ":updateShas"
36 package() {
37   install -dm755 "${pkgdir}/usr/share/opensearch/plugins/opensearch-performance-analyzer"
38   cd "${pkgdir}/usr/share/opensearch/plugins/opensearch-performance-analyzer"
39   unzip "${srcdir}/performance-analyzer-${pkgver}/build/distributions/opensearch-performance-analyzer-${pkgver}.zip"
41   install -Dm644 "${srcdir}/performance-analyzer-${pkgver}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"