Date: Friday, March 25, 2022 @ 23:59:45 Author: hashworks Revision: 1176777
archrelease: copy trunk to community-x86_64 Added: opensearch-sql-plugin/repos/community-x86_64/ opensearch-sql-plugin/repos/community-x86_64/PKGBUILD (from rev 1176776, opensearch-sql-plugin/trunk/PKGBUILD) ----------+ PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) Copied: opensearch-sql-plugin/repos/community-x86_64/PKGBUILD (from rev 1176776, opensearch-sql-plugin/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2022-03-25 23:59:45 UTC (rev 1176777) @@ -0,0 +1,41 @@ +# Maintainer: Justin Kromlinger <hashwo...@archlinux.org> + +pkgname=opensearch-sql-plugin +pkgver=1.3.0.0 +pkgrel=1 +_opensearchver=1.3.0 +_jdkver=11 +pkgdesc="OpenSearch SQL Plugin" +arch=('x86_64') +url="https://opensearch.org/docs/latest/search-plugins/sql" +license=('Apache') +depends=("opensearch=${_opensearchver}") +makedepends=("java-environment=${_jdkver}" 'unzip') +source=( + "${pkgname}-${pkgver}.tar.gz::https://github.com/opensearch-project/sql/archive/${pkgver}.tar.gz" +) +sha256sums=('9978dd3d70b668cd1f1248faaff138139622731caf401f442c48e64e9569b9e3') + +build() { + cd "sql-${pkgver}" + export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk" + export PATH="/usr/lib/jvm/java-${_jdkver}-openjdk/bin:$PATH" + export GRADLE_OPTS="-Dbuild.snapshot=false -Dopensearch.version=${_opensearchver}" + # :doctest requires python 3.7 + # :sql:build and :integ-test (reaper) require JDK 14 + ./gradlew build \ + --exclude-task ":doctest:bootstrap" \ + --exclude-task ":doctest:stopOpenSearch" \ + --exclude-task ":doctest:doctest" \ + --exclude-task ":jacocoTestReport" \ + --exclude-task ":sql:build" \ + --exclude-task ":integ-test:integTest" +} + +package() { + install -dm755 "${pkgdir}/usr/share/opensearch/plugins/opensearch-sql" + cd "${pkgdir}/usr/share/opensearch/plugins/opensearch-sql" + unzip "${srcdir}/sql-${pkgver}/plugin/build/distributions/opensearch-sql-${pkgver}.zip" + + install -Dm644 "${srcdir}/sql-${pkgver}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" +}