开发者

Inserting a version number in debian package name

开发者 https://www.devze.com 2023-04-06 15:22 出处:网络
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)

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 packa开发者_Go百科ge with the major version number of the library in the name of the package, e.g.

  • librapidstorm12
  • rapidstorm12-plugin-fitter
  • rapidstorm12-bin

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.

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.

I thought I could handle this renaming via substitutions, but substitutions may not occur in package names.

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.

Does anyone know a clean, Debian way of changing the package name according to the version number?


AFAIK, there is nothing in the Linux shell that allows this. I ran into a very similar problem some time ago when I was re-writing a LinkSys router's firmware. Ultimately, you'll have to invest the time to get to know an automated build tool that does this for you. I'm a Java developer, and use Apache Ant religiously. Depending on your platform, you'll have to find a tool that suits your needs.

Most of these system allow you to specify a numeric versioning schema, and can be configured to increment that version every time you deploy.

Based on your needs I would start with any modern/extensions of make.

Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号