Debian Packaging

From MK Wiki EN
Jump to navigation Jump to search

Requirements

Package debhelper must be installed.

How To

Required files

Directory "debian" must contain these files:

  • changelog
  • compat
  • control
  • install
  • rules (this file must be executable)


Creating the package

dpkg-buildpackage -us -uc

The package is saved in the ".." folder.

If you want to prevent creation of files in your project directory, you can use this script:

prj=$(pwd | grep -o '[^/]*$'); destdir=/tmp/$prj/dpkg; mkdir -pv $destdir; cp -au . $destdir; pushd $destdir; dpkg-buildpackage -us -uc; popd;

The dpkg file is then saved in /tmp/$prj.

GitLab CI

There must be a directory "build" that contains the package file.

Credits