summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichael Lass2020-03-19 23:51:14 +0100
committerMichael Lass2020-03-20 00:16:08 +0100
commit4033072fa0d9411deeffd7f9fce491c606341e62 (patch)
tree695133d1f7971d11c8d1b131bf4a56465a6dbc1a /PKGBUILD
parent3a14c665846a3c77492ad531eb8a69818c8fc923 (diff)
downloadaur-4033072fa0d9411deeffd7f9fce491c606341e62.tar.gz
Build from source and do not include JRE
The package still includes all required java modules, in particular, we do not use java-openjfx. It seems that the provided javafx version is slightly different from Arch's java-openjfx, so trying to use the system jars leads to a crash on startup.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD58
1 files changed, 33 insertions, 25 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 024caeb1f4ab..5d09a09a871d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,39 +8,47 @@
pkgname=jabref
pkgver=5.0
-pkgrel=1
+pkgrel=2
pkgdesc="Graphical Java application for managing BibTeX and biblatex (.bib) databases"
-arch=(x86_64)
+arch=(any)
url="https://www.jabref.org/"
license=(MIT)
-depends=(alsa-lib freetype2 libnet libxrender libxtst python)
-source=(https://github.com/JabRef/jabref/releases/download/v${pkgver}/JabRef-${pkgver}-portable_linux.tar.gz
- https://raw.githubusercontent.com/JabRef/jabref/v${pkgver}/LICENSE.md
- https://raw.githubusercontent.com/JabRef/jabref/v${pkgver}/src/main/resources/icons/jabref.svg
+depends=(bash jre13-openjdk)
+makedepends=(jdk13-openjdk)
+options=(!strip !emptydirs)
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/JabRef/jabref/archive/v${pkgver}.tar.gz
+ jabref.sh
jabref.desktop)
-sha256sums=('2231df4a429e819f795483419bb40242ad1f0dc2a7893e546e62649b6a275e6c'
- '057113b2e1e3eaeffdbbfbc57febca6e02c53cb63b14ffc9e1fbacf6ddc17638'
- '84408ddc8c6e41e4367f3b6cd171909fb1cf7ac808495f3a8033b64a2ff4c40b'
+sha256sums=('52ac917dd96f20a05b4beb7ea4c52edcf8c6170bd49b36178f599d48ecd3a822'
+ '51379fbce194379d6c6b66cf9404361d42b916364fc1b5915553fe4b03d5f0e5'
'e499b4af1fc45223fdafd801a4dd8a1c3c59384c71bc2e6985ab701da97df717')
-# Preparation for building from source. Currently, the jlink step fails with the following message:
-# Process 'command '/usr/lib/jvm/java-13-openjdk/bin/jlink'' finished with non-zero exit value 1
-#build() {
-# cd ...
-#
-# export JAVA_HOME=/usr/lib/jvm/java-13-openjdk/
-#
-# ./gradlew --no-daemon assemble
-# ./gradlew --no-daemon jlink
-#}
+build() {
+ cd ${pkgname}-${pkgver}
+
+ export JAVA_HOME=/usr/lib/jvm/java-13-openjdk/
+
+ # Avoid storing maven packages in the user's home (comment out to cache resources)
+ sed -i '/^\s*mavenLocal()\s*$/d' build.gradle
+
+ ./gradlew \
+ --no-daemon \
+ -PprojVersion="${pkgver}" \
+ -PprojVersionInfo="${pkgver}--ArchLinux--${pkgrel}" \
+ assemble
+}
package() {
- install -dm755 "${pkgdir}/opt/jabref" "${pkgdir}/usr/bin"
+ install -dm755 "${pkgdir}"/usr/share/java/${pkgname}
+ install -Dm755 jabref.sh "${pkgdir}"/usr/bin/JabRef
+ install -Dm644 jabref.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
- cp -r "${srcdir}"/JabRef/{bin,lib} "${pkgdir}"/opt/${pkgname}
- ln -sf /opt/${pkgname}/bin/JabRef "${pkgdir}"/usr/bin/JabRef
+ cd ${pkgname}-${pkgver}
+ install -Dm644 LICENSE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
+ install -Dm644 src/main/resources/icons/jabref.svg "${pkgdir}"/usr/share/pixmaps/${pkgname}.svg
- install -Dm644 "${srcdir}"/${pkgname}.desktop "${pkgdir}"/usr/share/applications/${pkgname}.desktop
- install -Dm644 "${srcdir}"/${pkgname}.svg "${pkgdir}"/usr/share/pixmaps/${pkgname}.svg
- install -Dm644 "${srcdir}"/LICENSE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
+ cd build
+ cp -r resources "${pkgdir}"/usr/share/java/${pkgname}
+ tar xf distributions/JabRef-${pkgver}.tar -C "${pkgdir}"/usr/share/java/${pkgname} JabRef-${pkgver}/lib --strip-components=1
+ rm "${pkgdir}"/usr/share/java/${pkgname}/lib/*-mac.*
}