diff options
author | Christoph Fink | 2021-10-22 10:59:58 +0300 |
---|---|---|
committer | Christoph Fink | 2021-10-22 10:59:58 +0300 |
commit | 59eb172a0707ad84ecdf5dbfad983aef5171b036 (patch) | |
tree | 1163d2d580663ffdd24d07eb78430ed61eb74e36 | |
download | aur-59eb172a0707ad84ecdf5dbfad983aef5171b036.tar.gz |
java-r5 v6.2
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | 01-don-t-try-to-guess-git-version_v6.2.patch | 29 | ||||
-rw-r--r-- | PKGBUILD | 78 | ||||
-rw-r--r-- | r5-backend.service | 14 | ||||
-rw-r--r-- | r5-backend.sysusers | 1 |
5 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b0e6b103f6cd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = java-r5 + pkgdesc = Conveyal R5 Routing Engine + pkgver = 6.2 + pkgrel = 1 + url = https://github.com/conveyal/r5 + arch = i686 + arch = x86_64 + license = MIT + makedepends = gradle + makedepends = git + depends = jdk11-openjdk + source = r5-6.2.tar.gz::https://github.com/conveyal/r5/archive/refs/tags/v6.2.tar.gz + source = 01-don-t-try-to-guess-git-version_v6.2.patch + source = r5-backend.service + source = r5-backend.sysusers + sha512sums = e2d3026904342c42dc7b3620a8f83f8779fc75944717d16c693eb1ebe00dc81320bdf1a4c24a70df1e76b5eabb4999bb823056239581d35b3c96f73d1020c5a2 + sha512sums = ceb669a12de7770877e6066e52bfd7103f100afc8adaf1a90fa95e6868683284623dd3b948732b8d3b3911260881a58868a21b935aa71ec9d613731728e290c6 + sha512sums = bbd8b1d60359bd1f33dd4aaf94752cdd7c338e2b46cb91e6488df4f7c27f262ffda1789d010c7621652234be72c9813601bd0775f6e77bad04b8a7ef2d1d3be7 + sha512sums = 322e32156c18d323c9b62f97e2a3792c151a5f7b677b291061ea0da8697fc00cc6977dbcb3f723ea492ae339508dfb543d731fa1c4f857f7efc0e470c3d1fe09 + +pkgname = java-r5 diff --git a/01-don-t-try-to-guess-git-version_v6.2.patch b/01-don-t-try-to-guess-git-version_v6.2.patch new file mode 100644 index 000000000000..857916ad717d --- /dev/null +++ b/01-don-t-try-to-guess-git-version_v6.2.patch @@ -0,0 +1,29 @@ +diff --unified --recursive --text a/build.gradle b/build.gradle +--- a/build.gradle 2021-10-18 12:09:38.389096998 +0000 ++++ b/build.gradle 2021-10-18 12:10:04.859168754 +0000 +@@ -2,7 +2,6 @@ + id 'java' + id 'com.github.johnrengelman.shadow' version '6.0.0' + id 'maven-publish' +- id 'com.palantir.git-version' version '0.12.3' + id 'com.google.cloud.tools.jib' version '2.6.0' + } + +@@ -116,7 +115,7 @@ + } + + classes { +- dependsOn createVersionProperties ++ // dependsOn createVersionProperties + } + + repositories { +@@ -172,7 +171,7 @@ + // Provides the EPSG coordinate reference system catalog as an HSQL database. + implementation group: 'org.geotools', version: geotoolsVersion, name: 'gt-epsg-hsql' + +- compile 'com.wdtinc:mapbox-vector-tile:3.1.0' ++ implementation 'com.wdtinc:mapbox-vector-tile:3.1.0' + + // Legacy JTS with com.vividsolutions package name. Newer Geotools compatible with Java 11 uses a newer version of + // JTS with the org.locationtech package name. But our MapDB format includes serialized JTS geometries with the diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..750b1f6bfc79 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,78 @@ +# Maintainer: peippo <christoph+aur@christophfink.com> + +pkgname=java-r5 +_pkgname=${pkgname#java-} +pkgver=6.2 +pkgrel=1 + +pkgdesc="Conveyal R5 Routing Engine" +url="https://github.com/conveyal/r5" +license=("MIT") + +arch=("i686" "x86_64") + +depends=("jdk11-openjdk") +makedepends=("gradle" "git") + +source=( + "${_pkgname}-${pkgver}.tar.gz::https://github.com/conveyal/${_pkgname}/archive/refs/tags/v${pkgver}.tar.gz" + "01-don-t-try-to-guess-git-version_v6.2.patch" + "r5-backend.service" + "r5-backend.sysusers" + +) +sha512sums=( + "e2d3026904342c42dc7b3620a8f83f8779fc75944717d16c693eb1ebe00dc81320bdf1a4c24a70df1e76b5eabb4999bb823056239581d35b3c96f73d1020c5a2" + "ceb669a12de7770877e6066e52bfd7103f100afc8adaf1a90fa95e6868683284623dd3b948732b8d3b3911260881a58868a21b935aa71ec9d613731728e290c6" + "bbd8b1d60359bd1f33dd4aaf94752cdd7c338e2b46cb91e6488df4f7c27f262ffda1789d010c7621652234be72c9813601bd0775f6e77bad04b8a7ef2d1d3be7" + "322e32156c18d323c9b62f97e2a3792c151a5f7b677b291061ea0da8697fc00cc6977dbcb3f723ea492ae339508dfb543d731fa1c4f857f7efc0e470c3d1fe09" +) + +prepare() { + cd "${_pkgname}-${pkgver}" + patch --forward --strip=1 --input="${srcdir}/01-don-t-try-to-guess-git-version_v6.2.patch" + gradle --quiet clean +} + +build() { + cd "${_pkgname}-${pkgver}" + gradle --quiet assemble + gradle --quiet shadowJar +} + +check() { + cd "${_pkgname}-${pkgver}" + gradle --quiet check +} + +package() { + install \ + -Dm0644 \ + "${_pkgname}-${pkgver}/build/libs/${_pkgname}-v${pkgver}-all.jar" \ + "${pkgdir}/usr/share/java/${_pkgname}/${_pkgname}-v${pkgver}-all.jar" + + ln -s \ + "/usr/share/java/${_pkgname}/${_pkgname}-v${pkgver}-all.jar" \ + "${pkgdir}/usr/share/java/${_pkgname}/${_pkgname}-all.jar" + + install \ + -Dm0644 \ + "${_pkgname}-${pkgver}/analysis.properties.template" \ + "${pkgdir}/etc/${_pkgname}/analysis.properties" + + install \ + -Dm0644 \ + "${_pkgname}-${pkgver}/LICENSE" \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + install \ + -Dm0644 \ + r5-backend.sysusers \ + "${pkgdir}/usr/lib/sysusers.d/r5-backend.conf" + + install \ + -Dm0644 \ + r5-backend.service \ + "${pkgdir}/usr/lib/systemd/system/r5-backend.service" + +} diff --git a/r5-backend.service b/r5-backend.service new file mode 100644 index 000000000000..4dbec8caeea4 --- /dev/null +++ b/r5-backend.service @@ -0,0 +1,14 @@ +[Unit] +Description = Conveyal R5 Routing Engine backend + +[Service] +Type = simple + +User = r5-backend +Group = r5-backend + +WorkingDirectory = /etc/r5/ +ExecStart = /usr/bin/java -Xmx2g --class-path /usr/share/java/r5/r5-all.jar com.conveyal.analysis.BackendMain + +[Install] +WantedBy = multi-user.target diff --git a/r5-backend.sysusers b/r5-backend.sysusers new file mode 100644 index 000000000000..29acee922e8e --- /dev/null +++ b/r5-backend.sysusers @@ -0,0 +1 @@ +u r5-backend - "R5 backend" - /usr/bin/nologin |