Views

Making Jajuk Packages

This guide explains how to configure to create Jajuk packages.

Contents

Creating packager user

Workspace of: Packager
Browse this workspace
Browse other Workspaces
Members Corner
Contacts
Contact us
Main Guides
Packager Guide
Active tickets (Trac)
Workspace's Tickets

Most of the tasks must be made using 'jbuild' user. Be careful to not build packages as root, or it will make everything more complicated later because of permission problems.

# adduser jbuild

Creating SVN root directory

We create /svn-jajuk/ and not in home because /home/ is backed up hence this directory will be too big to backup.

# mkdir /svn-jajuk/
# chown jbuild.jbuild /svn-jajuk/
# chmod 4775 /svn-jajuk/

Getting current svn

Get last SVN, this take some time (2.2G to download).

# su jbuild
$ cd /svn-jajuk/
$ svn co https://jajuk.svn.sourceforge.net/svnroot/jajuk/

Installing packaging tools

# su jbuild
$ mkdir /svn-jajuk/tools/

izpack

I didn't find a way how to install IzPack directly on the server because it needs a display for the installation. I found this way around: download IzPack (http://izpack.org/downloads , IzPack-install-3.10.2.jar) on a box that have a display, install it ($ java -jar IzPack-install.jar) on this box, then zip the directory you installed it too, and scp it to the server, and finally unzip it.

# su jbuild
$ cd /svn-jajuk/tools/
$ mkdir IzPack
$ (unzip it here)

Javahelp

# su jbuild
$ cd /svn-jajuk/tools/
$ mkdir javahelp
$ cd javahelp/
$ unzip javahelp-2_0_04.zip

jsmooth

# su jbuild
$ cd /svn-jajuk/tools/
$ unzip jsmooth-0.9.9-7.zip

JarBundler

Download it at http://informagen.com/JarBundler/

# su jbuild
$ cd /svn-jajuk/tools/
$ tar xvfz jarbundler.tar.gz

Check your java version, you do need sun java 6:

To install it: apt-get install 'sun-java6-*'

# jarsigner -version
# javac -version
# java -version

To change version, use:

# update-alternatives --config java
# update-alternatives --config javac
# update-alternatives --config jarsigner
# update-alternatives --config keytool

Certificate (signing jar file)

Make sure your are using sun java6:

# update-alternatives --config keytool

Create your certificate:

# su jbuild
$ cd /home/jbuild/
$ keytool -genkey -validity 3600 -alias jajukteam

Ask for the jajukteam.cert, import it:

$ keytool -importcert -file jajukteam.cert

Doesn't work? You may want to look at:

$ cat /home/jbuild/.keystore
$ keytool -importcert -alias jajukteam -trustcacerts -file jajukteam.cert
$ keytool -list

Configuring the ant build.xml

Edit and configure build.xml

Building

The begining of the script make sure you are the correct user that can make the build

#/bin/sh
if [ "$(id -u)" != "1003" ]
then
  echo "You must be user 'jbuild', use command: su jbuild"
  exit 1
fi
cd /svn-jajuk/jajuk/trunk/jajuk/src/scripts/
ant deploy_new_release

Use the following to get the list of possible targets:

ant -p