summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrederik2019-09-10 18:33:37 +0200
committerfrederik2019-09-10 19:36:46 +0200
commit1ecc48a225920728d32b1516855a1b8775f164c3 (patch)
tree672536dd51909e216fa7e4edeb2f89885e466daf
downloadaur-1ecc48a225920728d32b1516855a1b8775f164c3.tar.gz
Initial upload: or-tools-java 7.3-1
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD33
2 files changed, 49 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6d8e6fcad234
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = or-tools-java
+ pkgdesc = Google`s Operations Research tools. With Java bindings.
+ pkgver = 7.3
+ pkgrel = 1
+ url = https://github.com/google/or-tools
+ arch = x86_64
+ license = Apache
+ makedepends = swig
+ depends = java-runtime>=7.0
+ conflicts = python-or-tools
+ conflicts = or-tools
+ source = https://github.com/google/or-tools/archive/v7.3.tar.gz
+ sha512sums = a8cc5b3103debe02bb7fbb40c7786a08182b152d6926889c07b1767c7affebe50fc0e658ed9bce41a5e7e21c88fe4d4bb1907b720a9d60a990da059a797b3342
+
+pkgname = or-tools-java
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..bde1531983e2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Aleksandar Trifunović <akstrfn at gmail dot com>
+
+pkgname=or-tools-java
+pkgver=7.3
+pkgrel=1
+pkgdesc='Google`s Operations Research tools. With Java bindings.'
+arch=('x86_64')
+url='https://github.com/google/or-tools'
+license=('Apache')
+depends=('java-runtime>=7.0')
+makedepends=('swig')
+conflicts=('python-or-tools' 'or-tools') # because it copies libortools.so to usr/lib
+source=("https://github.com/google/or-tools/archive/v${pkgver}.tar.gz")
+sha512sums=('a8cc5b3103debe02bb7fbb40c7786a08182b152d6926889c07b1767c7affebe50fc0e658ed9bce41a5e7e21c88fe4d4bb1907b720a9d60a990da059a797b3342')
+
+build() {
+ cd "${pkgname%-java}-${pkgver}"
+ JAVA_HOME="/usr/lib/jvm/default" make third_party
+ make java
+}
+
+check() {
+ cd "${pkgname%-java}-${pkgver}"
+ JAVA_HOME="/usr/lib/jvm/default" make test_java
+}
+
+package() {
+ cd "${pkgname%-java}-${pkgver}"
+ install -Dm755 -t "${pkgdir}/usr/lib" lib/libjniortools.so lib/libortools.so
+ install -Dm755 -t "${pkgdir}/usr/share/java/${pkgname}" lib/com.google.ortools.jar
+ install -dm 755 "${pkgdir}/usr/share/${pkgname}"
+ cp -ar examples/java/* "${pkgdir}/usr/share/${pkgname}"
+}