Prepare Sources

Kria SOM App Store Applications Developer Deployment Guide for Ubuntu (UG1630)

Document ID
Release Date
1.0 English

The build is performed from inside the source directory. All the dependency packages must be installed for the source to build. The source working directory is prepared as described here for new sources or existing packages.

New Package

For a new package, choose the correct package name that represent the application. Refer to DEB Naming Convention for the naming convention to follow.

The upstream source packages can be fetched using wget or equivalent Linux commands. Normally the downloaded tarball is in the form of <package>-<version>.tar.gz. These usually contain a directory called package-version with all the sources inside. If the latest version of the source is available through a version control system (VCS) such as Git, Subversion, or CVS, you need to get it with git clone, svn co, or cvs co and repack it into tar+gzip format by using the --exclude-vcs option.

The source must include the correct license used for the software distribution. Extract the package and change directory to move inside the package source.

Existing Package

For the existing Debian packages, the latest sources can be fetched using the apt source <package>[=<version>] command. For this to work, make sure the deb-src entry for the repository hosting the package is added to the /etc/apt/sources.list file. For example:

deb-src jammy

The apt source <package> command downloads the following files for the package:

  • Debian source package control file: <package>_<version>-<BuildVersion>.dsc
  • Debian modification (debian/ directory): <package>_<version>-<BuildVersion>.debain.tar.xz
  • Original sources with the Debian directory: <package>_<version>.orig.tar.gz

By default, the apt source command also extracts the package source and adds the Debian directory from the tar ball.

If the new source package is available (as an update), then rename it to <package>_<new_version>.orig.tar.gz and keep it at the same level as <package>_<version>.orig.tar.gz. Next, issue the uupdate command to automatically generate the new update package, and change the directory to the following new source:

cd <package>-<version>
uupdate ../<package>_<new_version>.orig.tar.gz -v <new_version>
cd ../<package>-<new_version>