checkinstall 询问版本

bro*_*s94 8 package-management autotools checkinstall

我有一个使用 checkinstall 安装的 autoconf/automake/autoeverything 项目。当我去安装它时,我会看到这个

This package will be built according to these values: 

0 -  Maintainer: [ brooks94@foo.com ]
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ mypkg ]
3 -  Version: [  ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ mypkg ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ mypkg ]
12 - Conflicts: [  ]
13 - Replaces: [  ]
Run Code Online (Sandbox Code Playgroud)

...通常看起来不错,但缺少“版本”。检查安装不会继续,直到我手动给它一个值。我的问题是,我可以将该版本放在哪个文件中,这样我就不需要每次都手动输入它?

bro*_*s94 4

好的,所以我想我已经弄清楚了。它将尝试以下操作:

  • 使用当前目录名称中“-”之后的任何内容。也就是说,将目录命名为“project-1.0”将为其赋予值“1.0”。我的目录简单地命名为“project”。
  • 其次,它会在 config.log 中查找“#define VERSION "something"”行,并为其赋予值“something”。我仍然不知道为什么我的 config.log 中没有该行。
  • 如果 config.log 文件不存在,它将使用当前日期。

就我而言,因为 config.log 确实存在,但缺少“#define VERSION”行,所以它根本没有任何价值。