将 Qt 依赖项添加到 rpmbuild 中的规范文件 [英] Adding Qt Dependencies to spec file in rpmbuild

查看:68
本文介绍了将 Qt 依赖项添加到 rpmbuild 中的规范文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Ubuntu 14.04,我正在更新现在使用 Qt 的应用程序的 rpmbuild 规范文件.

I'm using Ubuntu 14.04 and I am updating the rpmbuild spec file of an application that now uses Qt.

我需要的包如下:

sudo apt-get build-essential
sudo apt-get install mesa-common-dev -y
sudo apt-get install libglu1-mesa-dev -y
sudo apt-get qt5-default
sudo apt-get qtwebengine5-dev

我知道规范文件具有BuildRequires"和Requires"依赖项标签……编写此文件的任何帮助以及一些示例都会有所帮助.我有一个工作规范文件,我只需要添加依赖项.

I know the spec file has "BuildRequires" and "Requires" dependency tags...any help in writing this as well as some examples would be helpful. I have a working spec file I just need to add the dependencies.

推荐答案

我认为这里有些混乱.spec 文件用于生成 rpm 文件.但是 Ubuntu 使用 deb 文件.

I think there is some confusion here. spec files are used to generate rpm files. However Ubuntu uses deb files.

假设你真的想创建一个rpm;那么你需要知道这一点:

Supposing you really want to create an rpm; then you need to know this:

构建要求构建 rpm 需要这些包.通常,您需要 build-essential 和 '*-dev` 包来构建您的应用程序

BuildRequires these packages are required for building the rpm. Typically you will need build-essential and the '*-dev` packages for building your application

需要安装时需要这些软件包才能使您的应用程序正常工作;大多数情况下,您不再需要构建工具,但您仍然需要 qt5-default 例如.

Requires these packages are required upon installation for your application to work; mostly you don't need your build-tools anymore, but you still need the qt5-default for example.

PS:顺便提一下,我可能是世界上仅有的使用带有特殊转换脚本的规范文件构建 deb 包的人之一 https://bitbucket.org/klaussfreire/spec2deb/src/default/ 但我真的不建议这样做.

PS: on a little side note I might be one of the only people in the world building deb packages using spec files with a special conversion script https://bitbucket.org/klaussfreire/spec2deb/src/default/ but I wouldn't really recommend that.

这篇关于将 Qt 依赖项添加到 rpmbuild 中的规范文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆