Hi, I tried to create a small christmas present in the shape of debian package of JModelica.org. Unfortunately the way the Makefile is set up currently this is not possible.
In Makefile.am there are statements like:
cp $(abs_top_srcdir)/Compiler/ModelicaCompiler/bin/ModelicaCompiler.jar $(prefix)/lib/
These will fail when trying to build a debian/ubuntu package since it tries to copy to an absolute path. The error message one gets from debuild is then:
make: Entering directory `/home/dietmarw/.workspace/JModelica.org/build-area/jmodelica-1.1b1'
cp /home/dietmarw/.workspace/JModelica.org/build-area/jmodelica-1.1b1/Compiler/ModelicaCompiler/bin/ModelicaCompiler.jar /usr/lib/
cp: kan ikke opprette alminellig fil «/usr/lib/ModelicaCompiler.jar»: Permission denied
To avoid this one needs to use $DESTDIR like this:
cp $(abs_top_srcdir)/Compiler/ModelicaCompiler/bin/ModelicaCompiler.jar $(DESTDIR)$(prefix)/lib/
in all places of install and uninstall. And of course this also needs to be incorporated in the configure process. Currently it will fail since $DESTDIR is not defined (i.e., empty)
Once this is corrected I can continue to build a proper package.