diff --git a/Makefile b/Makefile index 12a25cf6a..4c464a15c 100644 --- a/Makefile +++ b/Makefile @@ -1690,6 +1690,14 @@ rocksdbjavastaticreleasedocker: rocksdbjavastatic cd java/target;jar -uf $(ROCKSDB_JAR_ALL) librocksdbjni-*.so librocksdbjni-*.jnilib cd java/target/classes;jar -uf ../$(ROCKSDB_JAR_ALL) org/rocksdb/*.class org/rocksdb/util/*.class +rocksdbjavastaticdockerppc64le: + mkdir -p java/target + DOCKER_LINUX_PPC64LE_CONTAINER=`docker ps -aqf name=rocksdb_linux_ppc64le-be`; \ + if [ -z "$$DOCKER_LINUX_PPC64LE_CONTAINER" ]; then \ + docker container create --attach stdin --attach stdout --attach stderr --volume `pwd`:/rocksdb-host --name rocksdb_linux_ppc64le-be evolvedbinary/rocksjava:centos7_ppc64le-be /rocksdb-host/java/crossbuild/docker-build-linux-centos.sh; \ + fi + docker start -a rocksdb_linux_ppc64le-be + rocksdbjavastaticpublish: rocksdbjavastaticrelease rocksdbjavastaticpublishcentral rocksdbjavastaticpublishdocker: rocksdbjavastaticreleasedocker rocksdbjavastaticpublishcentral diff --git a/java/crossbuild/docker-build-linux-centos.sh b/java/crossbuild/docker-build-linux-centos.sh index 44a8bfe06..be0999bc7 100755 --- a/java/crossbuild/docker-build-linux-centos.sh +++ b/java/crossbuild/docker-build-linux-centos.sh @@ -5,7 +5,15 @@ set -e rm -rf /rocksdb-local cp -r /rocksdb-host /rocksdb-local cd /rocksdb-local -scl enable devtoolset-2 'make jclean clean' -scl enable devtoolset-2 'PORTABLE=1 make rocksdbjavastatic' + +# Use scl devtoolset if available (i.e. CentOS <7) +if hash scl 2>/dev/null; then + scl enable devtoolset-2 'make jclean clean' + scl enable devtoolset-2 'PORTABLE=1 make rocksdbjavastatic' +else + make jclean clean + PORTABLE=1 make rocksdbjavastatic +fi + cp java/target/librocksdbjni-linux*.so java/target/rocksdbjni-*-linux*.jar /rocksdb-host/java/target