I have a C++ application that I want to deploy to Ubuntu/Debian users. But I have one constraint: this application should not be pre-compiled binary, but must compile in user environment. How can I organize the source .deb
package that will be builds on user machine ?
Steps:
tar -czf project_1.0.orig.tar.gz project-1.0
to get .orig
tarballdh_make
to get debian
folderdebian/control
and debian/rules
filesdpkg-source -b
to get .dsc
and .debian.tar.xz
.deb
file ???|-- project-1.0
| |-- debian
| | |-- changelog
| | |-- control
| | |-- copyright
| | |-- rules
| | `-- source
| `-- src
| |-- CMakeLists.txt
| `-- main.cpp
|-- project_1.0-1.debian.tar.xz
|-- project_1.0-1.dsc
`-- project_1.0.orig.tar.gz
debian/control
Source: project
Section: misc
Priority: optional
Maintainer: My Name <[email protected]>
Build-Depends: cmake, debhelper-compat (= 12), qtbase5-dev, qtdeclarative5-dev
Standards-Version: 4.5.0
Package: project
Architecture: any
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}, qml-module-qtquick2
Description: Super usefull tool
debian/rules
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- -DIS_DEV=OFF
Thank a lot in advance !
There is no sane way to create a Debian package with these requirements. Just make sure installing from source works out of the box on your target platform(s).
You might want to ensure that any dependencies are installed, perhaps as part of your Makefile
. This serves the same purpose as having a sequence of Build-Depends:
in your debian/control
file.