summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Schwan2020-05-17 04:51:13 +0200
committerFrederik Schwan2020-05-17 04:51:13 +0200
commit55e9e8eede06e1f2f8b38655e33e01b72f119c0c (patch)
treea15a4cedfacb31242fc6728a97b7a5a068c54b6f
parent551ab900ebcfd4febdabca10dd3b644b72ab2e24 (diff)
downloadaur-55e9e8eede06e1f2f8b38655e33e01b72f119c0c.tar.gz
review by anthraxx
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD68
2 files changed, 69 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9a206621fb53..843cfb785af3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -10,8 +10,28 @@ pkgbase = or-tools-java
makedepends = cmake
makedepends = git
depends = java-runtime>=7.0
- source = https://github.com/google/or-tools/archive/v7.6.tar.gz
+ source = https://github.com/google/or-tools/archive/v7.6/or-tools-java-7.6.tar.gz
+ source = git+https://github.com/gflags/gflags.git
+ source = git+https://github.com/google/glog.git
+ source = git+https://github.com/google/protobuf.git
+ source = git+https://github.com/abseil/abseil-cpp.git
+ source = git+https://github.com/NixOS/patchelf.git
+ source = git+https://github.com/coin-or/Cbc.git
+ source = git+https://github.com/coin-or/Cgl.git
+ source = git+https://github.com/coin-or/Clp.git
+ source = git+https://github.com/coin-or/Osi.git
+ source = git+https://github.com/coin-or/CoinUtils.git
b2sums = 276fc43ff736dbc559118d887d17bc140151b2754dc96f936b4a2238e75b120028590396b8134d08c237c2a224180ec29c29fa37e85cd292511943b8d89651b3
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = SKIP
pkgname = or-tools-java
diff --git a/PKGBUILD b/PKGBUILD
index 2005802e8e2e..e7e84de2ded9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,12 +9,40 @@ url='https://github.com/google/or-tools'
license=('Apache')
depends=('java-runtime>=7.0')
makedepends=('swig' 'python' 'cmake' 'git')
-source=("https://github.com/google/or-tools/archive/v${pkgver}.tar.gz")
-b2sums=('276fc43ff736dbc559118d887d17bc140151b2754dc96f936b4a2238e75b120028590396b8134d08c237c2a224180ec29c29fa37e85cd292511943b8d89651b3')
+source=("https://github.com/google/or-tools/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ 'git+https://github.com/gflags/gflags.git'
+ 'git+https://github.com/google/glog.git'
+ 'git+https://github.com/google/protobuf.git'
+ 'git+https://github.com/abseil/abseil-cpp.git'
+ 'git+https://github.com/NixOS/patchelf.git'
+ 'git+https://github.com/coin-or/Cbc.git'
+ 'git+https://github.com/coin-or/Cgl.git'
+ 'git+https://github.com/coin-or/Clp.git'
+ 'git+https://github.com/coin-or/Osi.git'
+ 'git+https://github.com/coin-or/CoinUtils.git')
+b2sums=('276fc43ff736dbc559118d887d17bc140151b2754dc96f936b4a2238e75b120028590396b8134d08c237c2a224180ec29c29fa37e85cd292511943b8d89651b3'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
prepare() {
cd ${pkgname%-java}-${pkgver}
echo "JAVA_HOME = /usr/lib/jvm/default" >> Makefile.local
+
+ for src in "${source[@]}"; do
+ [[ $src = *.git ]] || continue
+ srcfolder=${src##*/}
+ srcfolder=${srcfolder%.git}
+ echo "s#${src#git+}#${srcdir}/${srcfolder}#"
+ sed -i "s#${src#git+}#${srcdir}/${srcfolder}#" ${srcdir}/${pkgname%-java}-${pkgver}/makefiles/Makefile.third_party.unix.mk
+ done
}
build() {
@@ -29,22 +57,22 @@ check() {
}
package() {
-cd ${pkgname%-java}-${pkgver}
-install -dm755 "${pkgdir}"/usr/share/${pkgname}
-install -dm755 "${pkgdir}"/etc/ld.so.conf.d/
-# We need to package all dependencies of which some may conflict with exisiting libs
-# So we use a separate dir
-install -Dm755 -t "${pkgdir}"/usr/lib/${pkgname} \
- lib/libjniortools.so \
- lib/libortools.so \
- dependencies/install/lib/libprotobuf-lite.so.3.11.2.0 \
- dependencies/install/lib/libgflags_nothreads.so.2.2.2 \
- dependencies/install/lib/libprotoc.so.3.11.2.0 \
- dependencies/install/lib/libgflags.so.2.2.2 \
- dependencies/install/lib/libglog.so.0.4.0 \
- dependencies/install/lib/libprotobuf.so.3.11.2.0
-for i in "${pkgdir}"/usr/lib/${pkgname}/*.so.*; do ln -rs ${i} ${i%so.*}so; done
-install -Dm755 -t "${pkgdir}/usr/share/java/${pkgname}" lib/com.google.ortools.jar
-echo "/usr/lib/${pkgname}" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
-cp -ar examples/java/* "${pkgdir}"/usr/share/${pkgname}
+ cd ${pkgname%-java}-${pkgver}
+ install -dm755 "${pkgdir}"/usr/share/${pkgname}
+ install -dm755 "${pkgdir}"/etc/ld.so.conf.d/
+ # We need to package all dependencies of which some may conflict with exisiting libs
+ # So we use a separate dir
+ install -Dm755 -t "${pkgdir}"/usr/lib/${pkgname} \
+ lib/libjniortools.so \
+ lib/libortools.so \
+ dependencies/install/lib/libprotobuf-lite.so.3.11.2.0 \
+ dependencies/install/lib/libgflags_nothreads.so.2.2.2 \
+ dependencies/install/lib/libprotoc.so.3.11.2.0 \
+ dependencies/install/lib/libgflags.so.2.2.2 \
+ dependencies/install/lib/libglog.so.0.4.0 \
+ dependencies/install/lib/libprotobuf.so.3.11.2.0
+ for i in "${pkgdir}"/usr/lib/${pkgname}/*.so.*; do ln -rs ${i} ${i%so.*}so; done
+ install -Dm755 -t "${pkgdir}/usr/share/java/${pkgname}" lib/com.google.ortools.jar
+ echo "/usr/lib/${pkgname}" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf
+ cp -ar examples/java/* "${pkgdir}"/usr/share/${pkgname}
}