从当前目录创建 RPM
我正在尝试从本地源创建 rpm。是否可以像 pdebuild
那样进行编译 - 只需将本地目录复制为源并对该副本进行操作?每次我执行 rpmbuild -ba ... 时,它都会尝试解压 RPMBUILD/SOURCE
中的一些存档,但我不想那样做。
本质上,我希望能够使用代码签出存储库,在该签出目录中执行 rpmbuild -ba application.spec 并让它做正确的事情......这可能吗?
I'm trying to create an rpm from local source. Is it possible to do compilation in a similar to what pdebuild
does - just copy the local directory as the source and operate on that copy? Every time I do rpmbuild -ba ...
it tries to unpack some archive in RPMBUILD/SOURCE
, but I don't want to go that way.
Essentially I'd like to be able to just checkout the repository with the code, do rpmbuild -ba application.spec
in that checkout directory and have it do the right thing... Is that possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道比以下更好的方法:
对于我自己的项目,我总是使用
Makefile
定义一次make rpm
,然后使用它。I don't know about a better way than the following:
For my own project, I'm always using a
Makefile
to definemake rpm
once and then just use it.规范文件中的
%setup
宏用于解压源代码。删除它,你的问题就消失了,你可以做任何你想做的事情来获取源代码。The
%setup
macro in the spec file is what unpacks the source. Remove that, and your problem goes away, and you can do anything you'd like to fetch the source.