diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 68 |
2 files changed, 69 insertions, 21 deletions
@@ -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 @@ -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} } |