• Avatar

    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:


    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
  • Avatar

    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

    if [ "$1" = "remove" ]; then
    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}"
    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?

Please sign in to leave a comment.