如何制作一个Debian包依赖于多个版本的libboost
我有一个 debian/control 文件,其中包括:
I have a debian/control file which includes:
Build-Depends: ... libboost1.35-dev, libboost-date-time1.35-dev, ...
这会阻止软件包在现代 Ubuntu 系统上构建.
This stops the package from building on modern Ubuntu systems.
我可以将所有 1.35s 更改为 1.38s,然后它可以在现代 Ubuntu 上运行,但不能在旧版本上运行.
I could just change all the 1.35s for 1.38s and then it would work on modern Ubuntu, but not older versions.
我想做这样的事情:
Build-Depends: ... libboost-dev (>=1.35), libboost-date-time-dev (>=1.35), ...
但似乎 1.35 被硬编码到包名称中.即 libbost1.35-dev 是与 libboost1.38m 不同的包,而不仅仅是同一包的不同版本.
but it seems that the 1.35 is hardcoded into the package names. i.e. libbost1.35-dev is a different package from libboost1.38m not just a different version of the same package.
我的理解正确吗?我可以理解将主要版本号硬编码到包名称中(如果新版本的 ABI 破坏了向后兼容性).
Is my understanding correct here? I can understand hardcoding major version numbers into the package name (if the new version's ABI breaks backward compatibility).
有没有办法编写一个 Debian 控制文件,允许一个包依赖于具有特定版本的 libboost 或更高版本?
Is there a way to write a Debian control file which allows a package to be depend on having a particular version of libboost or higher?
谢谢,
克里斯.
推荐答案
你应该依赖:libboost-dev" 除非有特殊原因要针对特定??版本的 Boost.这个 libboost-dev
包是一个伪包,它引入了合适的 libboost 版本.
You should "Depends: libboost-dev" unless there is a special reason to target for specific versions of Boost. This libboost-dev
package is a pseudo-package that pulls in the suitable version of libboost.
如果您真的想专门针对它们,请使用或"运算符:
If you really want to target them specifically, use the "or" operator:
Depends: A | B | C
参见:http://www.debian.org/doc/debian-policy/ch-relationships.html
相关文章