I am a bit confused about the question, Is it possible to control the package dependencies on Debian version specific?
In control file we need to specify the dependencies in "Depends" field, So if we want to make a single package for different Debian releases(Wheezy, Jessie, and Stretch) and if the dependencies are different for different release, then how can we define these kinds of dependencies in control file?
Thank You
Depends on the dependencies.
Some packages have metapackages that automatically include right version for the active Debian release. The PHP packages, in particular, do that. For example, the
php-curl
package depends onphp7.0-curl
in stretch, andphp7.3-curl
in buster. If your package depends onphp-curl
, you'll automatically get the right version. Thepostgresql
package does the same, pulling inpostgresql-11
orpostgresql-9.6
, depending on the Debian release.If that doesn't work, you can try creating two binary packages in your source package called
myapp-jessie
andmyapp-stretch
, each of which depend on the right sets of packages for their release. Then in the main package:If none of those ideas work, you may need to maintain multiple control files, stand up an apt repo per release, build multiple packages, and deploy each to the appropriate apt repo.
What specific dependencies do you have?