How to build from source (packaging)

Help
2009-11-30
2013-05-08
  • Stefan Riemens
    Stefan Riemens
    2009-11-30

    Hi all,

    I'd like to package kelpie for fedora (I'm a packager already). However I don't have java experience. What I'd like to know is: how can I build kelpie entirely from source using only command line tools? I couldn't find any documentation on building kelpie from source. Google wasn't of help either (it looks to me like ant is not used, is that correct?)

    Thanks,
    Stefan

     
  • You are correct.  There is no ANT script to build from source.  I have always just used the eclipse GUI tooling, although I know it is possible to create an ANT script to build.. I will look into this and see if I can make one for you.

     
  • Stefan Riemens
    Stefan Riemens
    2009-12-07

    That would be great! Thanks…

    Let me know if I can help testing stuff…

    Stefan

     
  • Hi Stefan,

    I have just committed a set of ant build scripts and also a file BUILD.TXT that explains what is needed to run them.  I am not sure how well that will fit with the Fedora way of building Java applications.  Let me know if you would like things organised differently, or if you would like to change things about, please join the project here and add any modifications you think are required.

    I have been able to test the linux-x86 and windows-x86 builds, but I don't have hardware to test the others but they should work, if there are no typos.

    Regards
    Trevor

     
  • Stefan Riemens
    Stefan Riemens
    2010-01-01

    Thanks for working on this! I've just tried it: the good news is that the build itself went just fine. However, I get this error after a while:

    BUILD FAILED
    /home/stefan/flightgear/native/fgfp/build.xml:79: Cannot perform operation from directory to file.

    It tries to do this here:

            <copy tofile="${target.dir}/linux-gtk-x86/kelpie-planner">
                <fileset dir="${eclipse.home}/features"
                    includes="org.eclipse.equinox.executable_*/bin/gtk/linux/x86/launcher"/>
            </copy>

    However, there is no such directory. I've tried this with both the fedora  packaged version as well as the eclipse-rcp-galileo-SR1-linux-gtk.tar.gz download from eclipse.org.

    On a different note, although the publish target is great for making distributable tarballs, it's not quite ideal for packaging. Ideally, I'd like it to create the executable, along with one (or more) jars of fgfp itself. For the rest it should just use the system jars.

    Thanks,
    Stefan

    PS, it turns out that some requirements aren't yet packaged in fedora, most notably jogl. See https://bugzilla.redhat.com/show_bug.cgi?id=439630 and https://bugzilla.redhat.com/show_bug.cgi?id=439627. There is some recent movement there though, so I hope that will get cleared sometime soon…

     
  • The directory with all the launchers is in the Delta pack, http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1-200909170800/download.php?dropFile=eclipse-3.5.1-delta-pack.zip
    which contains all the extra bits for each platform.

    I understand what you mean by "just use the system jars" but I really have no idea how to do that.  Because I built this using the Eclipse RCP platform the jars would need to be built as OSGI bundles (which is easy enough), but even then I don't know how I could get the application to find them.  If you have any ideas, I would be happy to try them.

    regards
    Trevor

     
  • Stefan Riemens
    Stefan Riemens
    2010-01-04

    Getting closer, I now get an executable! It won't run however… during the splash screen, I get a dialog box pointing me to this file…

    http://riemens.org/fs/fgfp_log.log

    I'm also taking this to the fedora-devel-java mailing list. I'm new to java packaging, and it appears to become the first eclipse-rcp package in fedora. I could sure use some advice from experienced packagers!

    Thanks,
    Stefan