[arch-commits] Commit in opensearch-security-plugin/trunk (PKGBUILD)

Justin Kromlinger hashworks at gemini.archlinux.org
Fri Mar 25 20:00:01 UTC 2022


    Date: Friday, March 25, 2022 @ 20:00:01
  Author: hashworks
Revision: 1176643

upgpkg: opensearch-security-plugin 1.3.0.0-1

Modified:
  opensearch-security-plugin/trunk/PKGBUILD

----------+
 PKGBUILD |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-03-25 19:59:02 UTC (rev 1176642)
+++ PKGBUILD	2022-03-25 20:00:01 UTC (rev 1176643)
@@ -1,34 +1,34 @@
 # Maintainer: Justin Kromlinger <hashworks at archlinux.org>
 
 pkgname=opensearch-security-plugin
-pkgver=1.2.4.0
+pkgver=1.3.0.0
 pkgrel=1
+_opensearchver=1.3.0
+_jdkver=11
 pkgdesc="OpenSearch Security Plugin"
-arch=('x86_64')
+arch=('any')
 url="https://opensearch.org/docs/latest/security-plugin"
 license=('Apache')
-depends=('bash')
-depends=('opensearch')
-makedepends=('java-environment=11' 'unzip' 'maven' 'git')
-source=("git+https://github.com/opensearch-project/security.git#tag=${pkgver}")
+depends=("opensearch=${_opensearchver}")
+makedepends=("java-environment=${_jdkver}" 'unzip' 'git')
+source=("git+https://github.com/opensearch-project/security.git#tag=${pkgver}") # Build requires git
 sha256sums=('SKIP')
 
-prepare() {
+build() {
   cd "security"
-  sed -i "s|^    <version>${pkgver}-SNAPSHOT</version>$|    <version>${pkgver}</version>|" pom.xml
-  sed -i 's|^        <opensearch.version>\([0-9\.]*\)-SNAPSHOT</opensearch.version>$|        <opensearch.version>\1</opensearch.version>|' pom.xml
-}
+  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}"
 
-build() {
-  cd "security"
-  # TODO: Tests take forever and fail, find a way to skip integration tests
-  mvn clean package -Padvanced -DskipTests
+  # Currently the tests don't provide a way to skip the integration tests
+  # … so we skip them entirely for now
+  ./gradlew assemble
 }
 
 package() {
   install -dm755 "${pkgdir}/usr/share/opensearch/plugins/opensearch-security"
   cd "${pkgdir}/usr/share/opensearch/plugins/opensearch-security"
-  unzip "${srcdir}/security/target/releases/opensearch-security-${pkgver}.zip"
+  unzip "${srcdir}/security/build/distributions/opensearch-security-${pkgver}.zip"
 
   install -Dm644 "${srcdir}/security/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
 }



More information about the arch-commits mailing list