diff options
| author | hallgren <hallgren@chalmers.se> | 2016-04-12 15:01:11 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2016-04-12 15:01:11 +0000 |
| commit | 145495339155ac97c4dfb4e3401fdca635980311 (patch) | |
| tree | 758edffc5a9ee21851e845e0d9fb5941d2ae90ce /bin/build-binary-dist.sh | |
| parent | 94b8ebf40215e477cf625d55e83b1c718e406e08 (diff) | |
Changes to include the Java binding in binary distribution packages
This means that you now need to have a Java SDK installed to build
a Debian package.
The bin/build-binary-dist.sh (which builds bintar packages and OS X installer
packages) now skips the Python binding if python is not installed. Likewise
it skips the Java binding if a Java SDK is not installed.
Diffstat (limited to 'bin/build-binary-dist.sh')
| -rw-r--r-- | bin/build-binary-dist.sh | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 04bc52000..19c30b1ec 100644 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -32,18 +32,29 @@ bash setup.sh install prefix="$destdir$prefix" popd ## Build the python binding to the C run-time system -pushd src/runtime/python -EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build -python setup.py install --prefix="$destdir$prefix" -popd +if which >/dev/null python; then + pushd src/runtime/python + EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build + python setup.py install --prefix="$destdir$prefix" + popd +else + echo "Python is not installed, so the Python binding will not be included" +fi ## Build the Java binding to the C run-time system -pushd src/runtime/java -# not implemented yet -popd +if which >/dev/null javac && which >/dev/null jar ; then + pushd src/runtime/java + rm -f libjpgf.la # In case it contains the wrong INSTALL_PATH + make INSTALL_PATH="$prefix/lib" + make INSTALL_PATH="$destdir$prefix/lib" install + cp jpgf.jar "$destdir$prefix/lib" # missing from make install... + popd +else + echo "Java SDK is not installed, so the Java binding will not be included" +fi ## Build GF, with C run-time support enabled -cabal install --only-dependencies +cabal install --only-dependencies -fserver -fc-runtime $extra cabal configure --prefix="$prefix" -fserver -fc-runtime $extra DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal build cabal copy --destdir="$destdir" |
