I'm building a Debian package which gathers together a number of other closely tied packages by declaring them as dependencies. I want those dependencies to be exactly the same version as the package. Is there a way within the Debian build system to avoid hard coding this within the control file (aside from pre-processing the control file myself)?
Something like:
Depends: libfoo = ${version}, libbar = ${version}
I'm maintaining zookeeper in Debian, binary package zookeeperd (with 'd' at the end) must depend on the exact same version of binary package zookeeper, so in debian/control
I have:
Package: zookeeperd
Depends: ${misc:Depends}, zookeeper (= ${binary:Version}), lsb-base (>= 3.2-14)
See more on substitution variables in the Debian Policy, chapter 4.10.