summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Sun2019-09-03 14:08:19 -0400
committerAndrew Sun2019-09-03 14:08:19 -0400
commit8894b5cd5859f4ce1230930fecdc5b0d336afd4e (patch)
tree8aff16f77e69f16a58598873ffa2c48a9f89e936
parent3f4f30ed49c5c9e57c4949a6defc1053697a5907 (diff)
downloadaur-8894b5cd5859f4ce1230930fecdc5b0d336afd4e.tar.gz
fix build with maven
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD10
2 files changed, 8 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ca4cef68297..702990c02b8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,7 +6,7 @@ pkgbase = xstream
arch = any
license = BSD
makedepends = maven
- depends = java-environment
+ depends = java-environment=8
source = xstream-1.4.11.1.tar.gz::https://github.com/x-stream/xstream/archive/XSTREAM_1_4_11_1.tar.gz
sha256sums = eef0a6663e845960d1816fe020aad19f9da5216f99cd371ea7e13f6829261c8d
diff --git a/PKGBUILD b/PKGBUILD
index d8f1ba366ed..00d607b4983 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,23 +9,27 @@ pkgdesc="Simple java library to serialize objects to XML and back again."
arch=('any')
url="https://x-stream.github.io/"
license=('BSD')
-depends=('java-environment')
+depends=('java-environment=8')
makedepends=('maven')
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/x-stream/xstream/archive/${pkgname^^}_${pkgver//./_}.tar.gz")
sha256sums=('eef0a6663e845960d1816fe020aad19f9da5216f99cd371ea7e13f6829261c8d')
build() {
cd "${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}"
- mvn clean package -Dmaven.test.skip=true -Dmaven.repo.local="${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}"
+ mvn clean package -Dmaven.test.skip=true -Dmaven.repo.local="${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}" -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
}
package() {
- mkdir -p ${pkgdir}/usr/share/java/${pkgname}
+ mkdir -p ${pkgdir}/usr/share/java/${pkgname}/lib
cd "${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}/xstream-distribution"
for i in target/libs/*.jar ; do
install -m644 ${i} ${pkgdir}/usr/share/java/${pkgname}
done
+ for i in ../xstream/target/dependencies/*.jar ; do
+ install -m644 ${i} ${pkgdir}/usr/share/java/${pkgname}/lib
+ done
+
install -Dm644 ${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
install -Dm644 ${srcdir}/${pkgname}-${pkgname^^}_${pkgver//./_}/README.txt ${pkgdir}/usr/share/doc/${pkgname}/README.txt
}