I've created an Java application and I would like to create an installation RPM for it. The application consists of a set of jar files, a system library file, a script to launch the application, and a directory to store user configuration information. The installation structure I'm trying to achieve looks like this:
/usr/local/[appname]
/jar
*.jar
/lib
*.so
/etc
[future home of user.properties]
launch.sh
Most of the information I've studied for .spec
files and RPM
in general, revolves around using make
to configure and install an application. I haven't found any good information on packaging Java applications. Currently, my build system arranges all the files into the above structure, copies it to the BUILD
directory and the spec file just dumps it. That works but I've found in testing that there are several directives that I need to include for the %files
section and I generally feel like I'm having to be more specific than I should for an automated build process.
Is there a correct (or best) way to package a Java applications for RPM?.