What programming language should I use to write a source package for a .deb package?

I want to package a C++ program.

  • You mean you want to package a C++ program, or that you want to write the packaging rules in C++?
    – muru
    Nov 22, 2015 at 11:39
  • 2
    Oh. Then you can use whatever language you want.
    – muru
    Nov 22, 2015 at 11:42
  • 1
    @user464180, you can package anything even create an empty a dummy one. You can look here for available packages a examples packages.ubuntu.com . You can list contained files.
    – user.dz
    Nov 22, 2015 at 13:15
  • C++ is a programming language of the compiled type which means that this language results on a binary which can be run it a compatible operative system. Packaging applications is the way this binary also called software packages is then delivered to the user. This packages have the task of the delivering the software files where it can be found by the application launcher.
    – userDepth
    Nov 22, 2015 at 20:41

2 Answers 2



Source code that requires compilation will be compiled when building the binary package; see IntroDebianPackaging at wiki.debian.org for instructions on how to create a source package containing source code that requires compilation.


There are other ways, but if your c++ program is built with cmake you can use the cpack module to generate a .deb file from the build.

Here is an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.