Foreign Packaging: Difference between revisions
(Fixes the links) |
|||
Line 1: | Line 1: | ||
We assume that the application is already packaged as a [https://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling#Fat-Jar | We assume that the application is already packaged as a [https://jogamp.org/wiki/index.php/JogAmp_JAR_File_Handling#Fat-Jar fat JAR] called "user-app.jar" for the sake of simplicity. | ||
= Red Hat Package Manager = | = Red Hat Package Manager = | ||
[http://www.rpm.org | [http://www.rpm.org RPM] (Red Hat Package Manager) is the default package management system under Red Hat, Fedora, Mageia, Mandriva, OpenSUSE, ... | ||
== Platform dependent tools == | == Platform dependent tools == | ||
Line 9: | Line 9: | ||
The following tools only work under GNU Linux or other Unix platforms with native rpm support. | The following tools only work under GNU Linux or other Unix platforms with native rpm support. | ||
[http://www.rpm.org/max-rpm-snapshot/rpmbuild.8.html | [http://www.rpm.org/max-rpm-snapshot/rpmbuild.8.html rpmbuild] can be used to build RPMs. You can find more information about RPM packaging in the [http://www.rpm.org/wiki/Docs#PackagerDocumentation official documentation]. | ||
The build tool [http://ant.apache.org | The build tool [http://ant.apache.org Ant] can call this command when you use its [http://ant.apache.org/manual/Tasks/rpm.html RPM task]. The build system [http://maven.apache.org Maven] does the same with its [http://mojo.codehaus.org/rpm-maven-plugin/ RPM plugin]. | ||
== Cross-platform tools == | == Cross-platform tools == | ||
[http://redline-rpm.org | [http://redline-rpm.org Redline RPM] is a pure Java library for manipulating RPM packages. It can be use in command line, with [http://ant.apache.org Ant] and with [http://maven.apache.org Maven]. | ||
Redline requires [http://commons.apache.org/proper/commons-compress/download_compress.cgi | Redline requires [http://commons.apache.org/proper/commons-compress/download_compress.cgi Apache Commons Compress], [http://www.bouncycastle.org/latest_releases.html Bounty Castle] and [http://www.slf4j.org/download.html SLF4J]. | ||
Using a distinct namespace or a different task name is necessary to avoid any conflict with the build-in Ant [http://ant.apache.org/manual/Tasks/rpm.html | Using a distinct namespace or a different task name is necessary to avoid any conflict with the build-in Ant [http://ant.apache.org/manual/Tasks/rpm.html RPM task] when defining a task for Redline: | ||
<code lang="xml"> | <code lang="xml"> |
Revision as of 10:03, 6 October 2014
We assume that the application is already packaged as a fat JAR called "user-app.jar" for the sake of simplicity.
Red Hat Package Manager
RPM (Red Hat Package Manager) is the default package management system under Red Hat, Fedora, Mageia, Mandriva, OpenSUSE, ...
Platform dependent tools
The following tools only work under GNU Linux or other Unix platforms with native rpm support.
rpmbuild can be used to build RPMs. You can find more information about RPM packaging in the official documentation.
The build tool Ant can call this command when you use its RPM task. The build system Maven does the same with its RPM plugin.
Cross-platform tools
Redline RPM is a pure Java library for manipulating RPM packages. It can be use in command line, with Ant and with Maven.
Redline requires Apache Commons Compress, Bounty Castle and SLF4J.
Using a distinct namespace or a different task name is necessary to avoid any conflict with the build-in Ant RPM task when defining a task for Redline:
<taskdef name="pure-java-rpm" classname="org.redline_rpm.ant.RedlineTask">
<classpath>
<pathelement path="bcpg-jdk15on-151.jar"/>
<pathelement path="commons-compress-1.8.1.jar"/>
<pathelement path="slf4j-api-1.7.7.jar"/>
<pathelement path="slf4j-simple-1.7.7.jar"/>
<pathelement path="redline-1.1.16.jar"/>
</classpath>
</taskdef>
Then, you can call this Ant task:
<pure-java-rpm group="Games" name="mygame" version="0" release="0" destination="rpms">
<zipfileset prefix="/usr/share/games/mygame" file="user-app.jar"/>
<depends name="java" version=">= 1.6"/>
</pure-java-rpm>