title: Inserting a version number in debian package name
body: <p>I am currently working on a project with a central library (librapidstorm), multiple plugins (one of them named rapidstorm-fitter) and a binary than dynamic-links all plugins together (rapidstorm-bin). Each of these components is packaged in its own Debian package with the major version number of the library in the name of the package, e.g.</p>
  
  <ul>
  <li>librapidstorm12</li>
  <li>rapidstorm12-plugin-fitter</li>
  <li>rapidstorm12-bin</li>
  </ul>
  
  <p>In principle, I think this naming scheme is useful because multiple versions of librapidstorm can be installed in parallel and additional, site-specific plugins are handled gracefully when they depend on librapidstorm12.</p>
  
  <p>Now, due to a few misdesigns in librapidstorm12 (which are too expensive to fix) the ABI of librapidstorm12 is broken more often than Guido Westerwelle's promises, while the API stays consistent. Which means, due to the logic of libtool versions, that the version number increases, which entails a change in all the subsequent package names. While this change is easy to handle on the pure source level, the Debian packages must be renamed manually/by sed.</p>
  
  <p>I thought I could handle this renaming via substitutions, but substitutions may not occur in package names.</p>
  
  <p>I tried to look up how other packages with the same problem (e.g. kernel) do it, but the version number is hard-coded in their control files, too.</p>
  
  <p>Does anyone know a clean, Debian way of changing the package name according to the version number?</p>