Creating a Debian Aptana IDE package

From Aptana Development

This document covers creating a package for installing the Aptana IDE on Debian

Contents

Requirements

Installer

  1. TBD

Application Files

Generic Linux

  • Application Files: ~/Aptana IDE Beta/
  • User Data: ~/Aptana (workspace)
  • Application Data: ~/.Aptana/Aptana IDE Beta/

That works out to:

  • osgi.instance.area.default=@user.home/Aptana IDE Beta
  • osgi.configuration.area=@user.home/.Aptana/Aptana IDE Beta/configuration
  • osgi.user.area=@user.home/.Aptana/Aptana IDE Beta/user

Uninstaller

  1. Installer should clean up installed files, removing everything except user-created items

Credits

1. Create a work folder, and copy Aptana binary zip distribution file. All the subsequent commands assume that the work folder created in this step as the current folder. Also unzip here the zip file attached to trac item linked at the bottom of this article : it contains text and image files to assist with Debian package creation, referred by steps 6 through 9.

2. Create a folder corresponding to Aptana release for which package is being created.

mkdir  aptana_0.2.7.13770

3. Create sub-folder DEBIAN

mkdir -p aptana_0.2.7.13770/DEBIAN

4. Determine and create folder where Aptana will be installed on a Debian system. E.g. If Aptana is to be installed within /opt, then create opt as sub-folder of the folder created in step 2 above.

mkdir -p aptana_0.2.7.13770/opt

5. Extract Aptana installable zip to the instalation folder

unzip aptana_0.2.7.13770.zip  aptana_0.2.7.13770/opt

6. Copy run-aptana script to 0.2.7.13770/opt/aptana folder.

cp run-aptana   aptana_0.2.7.13770/opt/aptana

7. Copy Desktop menu item and image.

mkdir -p aptana_0.2.7.13770/usr/share/applications
mkdir -p aptana_0.2.7.13770/usr/share/pixmap

Copy the desktop and icon files (found in the zip attached to the trac item ) to the folders created above.

cp aptana.desktop aptana_0.2.7.13770/usr/share/applications
cp aptana-icon.xpm aptana_0.2.7.13770/usr/share/applications

8. Change the release verison number as well as any other pertinent information in the control file. Copy the control file to the DEBIAN folder:

cp control aptana_0.2.7.13770/DEBIAN

9. Change permission of script files and copy these scripts to the DEBIAN folder.

chmod 755 postinst prerm
cp postinst aptana_0.2.7.13770/DEBIAN
cp prerm aptana_0.2.7.13770/DEBIAN

10. Change permissions

find ./ aptana_0.2.7.13770 -type d -exec chmod 755 '{}' \;

11. Create package

fakeroot  dpkg-deb --build aptana_0.2.7.13770

This results in creation of the package in current folder : aptana_0.2.7.13770.deb

12. The newly created package can be installed by running this command:

sudo dpkg -i aptana_0.2.7.13770

13. Remove temporary folder

rm -rf aptana_0.2.7.13770

View the following Trac ticket for a starter set of files ( control file, icon, desktop shortcut and supporting scripts ): http://www.aptana.com/trac/ticket/3749