Debian Packaging: Difference between revisions
Jump to navigation
Jump to search
(+GitLab CI) |
(→Creating the package: Add script that creates packages outside of current directory) |
||
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 == | == GitLab CI == |
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.