Put your short description here; used for first paragraph and abstract.
The following steps detail how to create a customized addon installer for Linux. Unlike on Windows, customizing a Linux addon does not involve modifying an existing, built installer, but rather creating a whole new RPM install package after modifying the provided spec file. The created RPM package can be converted to a Debian package later by using the Alien conversion utility.
These preparatory steps only need to be done once on your development machine, which must be a Linux machine that supports RPM building.
- Unzip the addon customization kit for Linux to a working directory.
- Update the packaged license files, if you wish to display/require license acceptance:
- Overwrite the provided dummy license files (RTF format) must be provided in the /license/ directory. You must keep any license filenames the same.
- If you do not wish to provide license information within your addon package, you may remove the license/ directory entirely.
- Replace the feature and plug-in in the content directory with your own addon feature(s) and plug-in(s) in the provided shared/eclipse/ site structure. By default, this structure is populated with a dummy test feature, provided as an example.
Note: During the building of the package, if a license directory is present, its contents will be moved to licens within the finalized package. This is done to avoid potential file ownership conflicts amongst other addon pacakges.
Customizing the spec file
To customize the provided spec file for use with your Linux system, edit the xpd-addon.spec file and modify the following tags. Knowledge of RPM spec files is assumed, so a full explanation of these tags is not provided.
- Summary -- change the summary to one appropriate to your addon
- Name -- set the name of the addon; built RPMs will have the format of --..rpm
- Version -- set the version of the addon
- Release -- set the release of the addon
- Vendor -- change the vendor information
- Provides -- set to the list of components provided, if any
- Requires -- set to require the base product the addons should install into (for example, "expeditor" or "ibm_lotus_notes")
- Prefix -- should be set to the default location of the base product (for example, /opt/ibm/lotus/Expeditor or /opt/ibm/lotus/notes)
- %description -- provide a description for the addon
- KIT_DIR within %build -- change to the location where the addon customization kit was unpacked
Customizing the deploy contents
The Linux customization kit contains a deploy/ directory which holds the default install and uninstall manifests for the addon. These manifests are named install.xpd-addon.xml and uninstall.xpd-addon.xml. The following customization should be done for the manifests.
- Modify the contents of install.addon.xml to include your feature(s). Rename the id to something unique for your addon and ensure that mergeaction="add" is set. Replace the existing entry with your set of features to install. Ensure that each entry has action="install".
- Make the same edits to uninstall.addon.xml as done for the install manifest shown above, however, ensure that each entry listed has action="uninstall".
- If you wish to add/change preferences using the plug-in_customization.ini, make the desired edits in the file according to the sample structure provided in the comments in that file. If you don't need to add/change any preferences during addon install, the plugin_customization.ini file can be removed.
Note: Features included in the addon should not be placed into the rcp/ site under any circumstances. Doing so will jeopardize their existence whenever the base product is upgraded (as the rcp/ site is totally wiped and recreated). So ensure that any included features in the addon are not upgrades to any existing platform features in the rcp/ site or have an internal colocation-affinity set to any existing platform feature in the rcp/ site. By default, the structure provided assumes all addons will go into the shared/ site in the platform.
Note: During the building of the package, the install.addon.xml, uninstall.addon.xml and plugin_customization.ini will be renamed as install..xml, uninstall..xml and plugin_customization..ini, respectively, within the finalized package. This is done to avoid potential file ownership conflicts amongst other addon pacakges.
Building the RPM package
To build the RPM package, run rpmbuild -bb xpd-addon.spec to build the binary package of the RPM. The RPM build begins and, assuming it is successful, the RPM package will be placed into /usr/src/redhat/RPMS--..rpm by default.
Converting from RPM to Devian packaging
On Ubuntu systems, Debian packaging is used. A quick way to convert an RPM package to a Debian package is to use the Alien utility.
- First obtain the alien program, if not already present, with sudo apt-get install alien.
- After alien is installed, directly convert the RPM with sudo alien -ck.
- A Debian package, named __.deb, will be generated.
The Alien utility will make some automatic assumptions about certain control fields that are not directly convertible from RPM packages (such as Priority, Section, and Depends). If you wish to make changes to this control data, then you will have to use Alien to generate the build tree (using sudo alien -gck ) for the package and then make edits to the debian/control file before building the Debian package. Instructions for building Debian packages directly can be found at http://www.debian.org
Parent topic: Creating a customized addon installer