mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
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.
This commit is contained in:
@@ -32,18 +32,29 @@ bash setup.sh install prefix="$destdir$prefix"
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
## Build the python binding to the C run-time system
|
## Build the python binding to the C run-time system
|
||||||
pushd src/runtime/python
|
if which >/dev/null python; then
|
||||||
EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build
|
pushd src/runtime/python
|
||||||
python setup.py install --prefix="$destdir$prefix"
|
EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build
|
||||||
popd
|
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
|
## Build the Java binding to the C run-time system
|
||||||
pushd src/runtime/java
|
if which >/dev/null javac && which >/dev/null jar ; then
|
||||||
# not implemented yet
|
pushd src/runtime/java
|
||||||
popd
|
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
|
## 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
|
cabal configure --prefix="$prefix" -fserver -fc-runtime $extra
|
||||||
DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal build
|
DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal build
|
||||||
cabal copy --destdir="$destdir"
|
cabal copy --destdir="$destdir"
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -3,7 +3,7 @@ Section: devel
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Thomas Hallgren <hallgren@chalmers.se>
|
Maintainer: Thomas Hallgren <hallgren@chalmers.se>
|
||||||
Standards-Version: 3.9.2
|
Standards-Version: 3.9.2
|
||||||
Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, python-dev, autoconf, libtool
|
Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool, python-dev, java-sdk
|
||||||
Homepage: http://www.grammaticalframework.org/
|
Homepage: http://www.grammaticalframework.org/
|
||||||
|
|
||||||
Package: gf
|
Package: gf
|
||||||
|
|||||||
10
debian/rules
vendored
10
debian/rules
vendored
@@ -15,25 +15,29 @@ override_dh_shlibdeps:
|
|||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build
|
cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build
|
||||||
|
cd src/runtime/java && make INSTALL_PATH=/usr/lib
|
||||||
echo LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs
|
echo LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs
|
||||||
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs cabal build
|
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs cabal build
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
rm -fr dist/build
|
rm -fr dist/build
|
||||||
-cd src/runtime/python && rm -fr build
|
-cd src/runtime/python && rm -fr build
|
||||||
|
-cd src/runtime/java && make clean
|
||||||
-cd src/runtime/c && make clean
|
-cd src/runtime/c && make clean
|
||||||
|
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
cd src/runtime/c && ./setup.sh configure --prefix=/usr
|
cd src/runtime/c && bash setup.sh configure --prefix=/usr
|
||||||
cd src/runtime/c && ./setup.sh build
|
cd src/runtime/c && bash setup.sh build
|
||||||
cabal update
|
cabal update
|
||||||
cabal install --only-dependencies
|
cabal install --only-dependencies
|
||||||
cabal configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
|
cabal configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs cabal copy --destdir=$(CURDIR)/debian/gf
|
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs cabal copy --destdir=$(CURDIR)/debian/gf
|
||||||
cd src/runtime/c && ./setup.sh copy prefix=$(CURDIR)/debian/gf/usr
|
cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr
|
||||||
cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr
|
cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr
|
||||||
|
cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr/lib install
|
||||||
|
cp src/runtime/java/jpgf.jar $(CURDIR)/debian/gf/usr/lib
|
||||||
D="`find debian/gf -name site-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv site-packages dist-packages
|
D="`find debian/gf -name site-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv site-packages dist-packages
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user