Debian packaging - cmake project

I am creating a package from a cmake project organized in 2 source directories:

When creating manually, I have to go into 2 src dirs and do:

cd src1 mkdir build cd build cmake .. etc. cd src2 mkdir build cd build cmake .. etc. 

Now it translates to the debian / rules files that I have:

 #!/usr/bin/make -f export DH_OPTIONS export DH_VERBOSE=1 %: dh " $@ " -Dsrc1 --buildsystem=cmake dh " $@ " -Dsrc2 --buildsystem=cmake 

This does not work and only builds a package with src1. Any hint?

+6
source share
1 answer

The dh command automatically detects the buildsystem . I recommend that you check the dh pages.

 man dh 

You can try this code in the debian/rules file:

 #!/usr/bin/make -f %: dh $@ --sourcedirectory=src1 dh $@ --sourcedirectory=src2 

Pull back dh lines with tabs, not spaces with the makefile syntax.

+4
source

Source: https://habr.com/ru/post/946937/


All Articles