How can I create debian packages using InstallBuilder?

asked 13 Sep '11, 06:39

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%


If you are using InstallBuilder Enterprise or InstallBuilder Professional, you can create Debian packages from your project file by selecting "DEB" as the build platform in the "Packaging" section of the builder application. In case you want to create the package from the command line, you can try the following:

/path/to/builder build /path/to/project.xml deb

InstallBuilder depends on dpkg to create Debian packages, so you will need to run the builder on a Linux distribution which provides Debian package support (such as Debian or Ubuntu).

Check below for the correspondence between DEB configuration fields and InstallBuilder ones:

DEB InstallBuilder
Version: <version>-<release>
Provides: <nativePackageName>
Maintainer: <vendor>
Description: <description>

The description on DEB packages holds a short single-line description plus a long description.

The short description is defined to be the first line inside the project tag.

The long description begins on the second line inside the <description>. Every line for the long description must be preceded by a single space character. By convenience the lines of the long description should not be too long.

Advanced Debian Package configuration

We have an advanced feature to generate custom Debian packages, implemented via a project property:

<project>
  ...
  <debianCustomPackageDirectory>/path/to/some/folder</debianCustomPackageDirectory>
  ...
</project>

Inside that property, you specify a path to a folder containing all the scripts that go inside the typical DEBIAN folder when creating a .deb package:

  • control
  • preinst
  • postinst
  • prerm
  • postrm

Optionally, the control script may make use of several variables that are configurable from the project:

Variable inside script  Project variables
${bitrock_deb_version}  <version>-<release>
${bitrock_deb_package}  <nativePackageName>
${bitrock_deb_provides}     <nativePackageName>
${bitrock_deb_maintainer}   <vendor>
${bitrock_deb_description}  <description>

It is also possible to reference some of the installer action lists using the special variables"

 ${bitrock_deb_post}    Substituted with the <postInstallationActionList>
 ${bitrock_deb_preun}   Substituted with the <preUninstallationActionList>
 ${bitrock_deb_postun}  Substituted with the <postUninstallationActionList>

In addition to that, we have:

${bitrock_deb_architecture} Will resolve to "amd64" if we are on a Linux x64 system or "i386" if we are on a 32-bit Operating System
${bitrock_deb_installedSize}    Will resolve to a value automatically calculated based on the sizes of the files packed inside the installer

An example control script could be:

Essential: no
Architecture: ${bitrock_deb_architecture}
Description: ${bitrock_deb_description}
Provides: ${bitrock_deb_provides}
Package: ${bitrock_deb_package}
Section: misc
Maintainer: ${bitrock_deb_maintainer}
Priority: optional
Installed-Size: ${bitrock_deb_installedSize}
Version: ${bitrock_deb_version}
Depends : somepackage, someotherpackage
link

answered 13 Sep '11, 06:46

Jake's gravatar image

Jake ♦♦
826222226235
accept rate: 98%

Is there a list of all of the bitrock_deb_* variables we have access to anywhere?

I'm trying to create a postrm file that looks like this

#!/bin/sh
if [ "$1" = "remove" ]; then
${bitrock_deb_postun}
fi
if [ "$1" = "upgrade" ]; then
if [ "v$2" != ${bitrock_deb_version} ]; then
#rm -f "/opt/bitrock/${bitrock_deb_package}-${bitrock_deb_version}/helperBinary" "/opt/bitrock/${bitrock_deb_package}-${bitrock_deb_version}/helperBinaryUninstall"
#rmdir "/opt/bitrock/${bitrock_deb_package}-${bitrock_deb_version}"
fi
fi
exit 0

But I can't reference the other variables in the postrm script for whatever reason. How do I go about making a smarter deb package?

link

answered 16 Feb '16, 13:25

Trezamere's gravatar image

Trezamere
1
accept rate: 0%

Could you post more information about the exact error you are getting? Is that script being written using an <writeFile> action? In which actionList is it placed?

(17 Feb '16, 06:35) alejandror ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×12
×9

Asked: 13 Sep '11, 06:39

Seen: 1,771 times

Last updated: 17 Feb '16, 06:35