How to package projects for official support
This describes how our Github packages are built.
To build Debian packages for our platform the following information is important:
- We use the official Debian build tools for packaging. The following dependencies must be installed before building:
sudo apt-get install devscripts quilt chrpath git wget apt-utils debhelper
Depending on the project, there may be more dependencies.
- The official Debian packaging process is (historically) complicated.
To simplify the package build configuration we use a single script.
Each project contains a makedeb.sh file which generates the package content and metadata on execution.
All configs are in this file and on execution the directory builddeb is created which contains the build data and the resulting debian archive file.
- The script’s workflow looks like this:
- Declare build variables
- Create an empty builddeb directory
- Copy all the relevant files from the project to a virtual root structure under builddeb/
- Generate the Debian archive metadata
- Generate the install/removal/upgrade files
- Build the package
- Architecture dependent projects (C/C++, Rust…) usually need to build the executable/library before the script is called.
- The packages must be built with the official image (root filesystem) and its dependencies.
The image/rootfs can run on real hardware or be emulated.
Package-cross-builds from other architectures (x86, amd64) or distributions (Ubuntu) are not possible!
This refers only to the packaging, but cross-compilation of the binaries is recommended.
This must be executed on the Nexus:
- sudo apt-get install devscripts quilt chrpath git wget apt-utils debhelper
- git clone https://github.com/nexus-unity/PROJECT
- Follow the project build steps (Note: Building projects can take very long!)
- ls -l builddeb/*.deb
Last modified October 20, 2021