Debian Packaging

From MK Wiki EN
Revision as of 05:56, 18 July 2023 by MkWikiEnSysOp (talk | contribs) (→‎Creating the package: Add script that creates packages outside of current directory)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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