Adding Qt Dependencies to spec file in rpmbuild

2019-09-20 09:18发布

问题:

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

The packages that I need are the following:

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

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.

回答1:

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

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

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

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: 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.