Debian Packaging: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Requirements == Package [https://packages.debian.org/debhelper debhelper] must be installed. == How To == === Required files === Directory "debian" must contain these f...") |
(→Creating the package: Add script that creates packages outside of current directory) |
||
(One intermediate revision by the same user not shown) | |||
Line 21: | Line 21: | ||
The package is saved in the ".." folder. | 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 <code>/tmp/$prj</code>. | |||
== GitLab CI == | |||
There must be a directory "build" that contains the package file. | |||
[https://about.gitlab.com/blog/2016/10/12/automated-debian-package-build-with-gitlab-ci/ Credits] | |||
[[Category:Linux]] | [[Category:Linux]] |
Latest revision as of 05:56, 18 July 2023
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.