debuild - Is it possible to create several debian packages with different names from one sources adding specific option

931 views Asked by At

I create debian packages using debuild.

one by command with variable for one target type:

debuild --set-envvar=TARGET=S_SS -b -us -uc -aarm64

another one for another one

debuild --set-envvar=TARGET=S_TT -b -us -uc -aarm64

This variable is used in Makefile.

Result of debuild compilation is the *.deb with the same package name for both cases. Is it possible to set specific package name or path to folder with necessary for compilation files (I mean control, changelog and etc.) different form default "debian" ?

1

There are 1 answers

0
umläute On

the debian/ folder (that contains all the the packaging stuff for Debian) is hard-coded into the Debian packaging tools. you cannot easily switch it around.

having said that: you can of course create multiple different binary packages, by declaring them in debian/control (and then adding the proper runes to debian/rules and accompanying configuration files, to declare which files should go into which package). this is all explained in depth in the various Debian packaging tutorials (and owuld be out-of-scope here in StackOverflow.

This variable is used in Makefile.

this is usually the wrong approach. Debian packages are built from source package, so they are conceptually "downstream" consumers of your build-system. in general you should not attempt to mix the two stages (building your software; packaging your software) into a single build system.

see https://wiki.debian.org/UpstreamGuide