archrelease: copy trunk to community-any
[ArchLinux/community.git] / opensearch-geospatial-plugin / trunk / PKGBUILD
blob288a9ca656e381efd2e17955e96df758b5b59754
1 # Maintainer: Justin Kromlinger <hashworks@archlinux.org>
3 pkgname=opensearch-geospatial-plugin
4 pkgver=2.6.0.0
5 pkgrel=1
6 _opensearchver=2.6.0
7 _jdkver=11
8 pkgdesc="OpenSearch Geospatial Plugin"
9 arch=('x86_64')
10 url="https://opensearch.org/docs/latest/dashboards/geojson-regionmaps/"
11 license=('Apache')
12 depends=("opensearch=${_opensearchver}")
13 makedepends=("java-environment=${_jdkver}" 'unzip')
14 source=(
15   "${pkgname}-${pkgver}.tar.gz::https://github.com/opensearch-project/geospatial/archive/${pkgver}.tar.gz"
17 sha256sums=('65369ce328cb83267abc3ead885ebaa7f96bdb288d44ad9ec864c5a9a333c79f')
19 build() {
20   cd "geospatial-${pkgver}"
21   export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
22   export PATH="/usr/lib/jvm/java-${_jdkver}-openjdk/bin:$PATH"
23   export GRADLE_OPTS="-Dbuild.snapshot=false -Dopensearch.version=${_opensearchver}"
24   ./gradlew build \
25     --exclude-task ":jacocoTestReport" \
26     --exclude-task ":jacocoTestCoverageVerification"
29 package() {
30   install -dm755 "${pkgdir}/usr/share/opensearch/plugins/opensearch-geospatial"
31   cd "${pkgdir}/usr/share/opensearch/plugins/opensearch-geospatial"
32   unzip "${srcdir}/geospatial-${pkgver}/build/distributions/opensearch-geospatial-${pkgver}.zip"
34   install -Dm644 "${srcdir}/geospatial-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"