title: How to create a RPM package with Redline RPM Java library?
body: <p>I would like to create a RPM package for <a href="http://tuer.sourceforge.net" rel="nofollow">my Java game</a> (currently packaged as JARs + JNLP file). I use Ant as a build tool. I cannot use platform-dependent tools as the few developers who use my source code use several operating systems, not necessarily GNU Linux unlike me. </p>
  
  <p>At first, I tried to use <a href="http://www.javadesktop.org/articles/jdic/index.html" rel="nofollow">JDIC</a> but its source code hasn't been maintained for years and I had to modify tons of things just to make it compile anew. Moreover, it just calls the native RPM tools under the hood. Then, I found <a href="https://ant.apache.org/manual/Tasks/rpm.html%E2%80%8E" rel="nofollow">RPM Ant task</a> but it uses the native RPM tools under the hood too. After that, I found <a href="http://mojo.codehaus.org/rpm-maven-plugin" rel="nofollow">RPM Maven plugin</a> but I don't want to switch to another build tool now just to create a RPM package. </p>
  
  <p>Finally, I found Redline RPM pure Java library which has an Ant task, there is an example <a href="http://redline-rpm.org/usage.html" rel="nofollow">here</a>. I still don't understand how to use it. I understand the role of a few basic fields (group, version, release, name), I know that I have to use "depends" to indicate that my game requires at least Java 1.7 but I don't know what to do with my JARs, where to put the .desktop file for the desktop shortcut and where to put the bash script that calls the main class to run my game. As a first step, I'd like to create a binary package. I have found another example using this library <a href="http://subversion.assembla.com/svn/cfdistro/trunk/cfdistro/src/cfdistro/rpm.xml" rel="nofollow">here</a>. Do I have to provide an uninstall script too? Should I use a postinstall script to copy the .desktop file into the desktop directory? Should I use a tarfileset for the third party libraries? I know it would be better to put the JARs into several RPMs but I want to succeed in doing something simple before doing more elaborated but cleaner things.</p>