-1

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.

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
Ankur Shah
  • 125
  • 12

1 Answers1

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.

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
  • Thanks for your response much appreciated. I know that in RHEL they use yum which does not have package names that correspond to apt-get under Ubuntu (example qt5-default called something else in yum)...how can I create a spec file that is compatible to both Ubuntu and RedHat? – Ankur Shah Jun 03 '19 at 21:11
  • Except for using spec2deb you cannot create a Deb from a spec file, and you need a Deb file on Ubuntu... – Chris Maes Jun 04 '19 at 05:12
  • Forget deb...I only want to create an RPM file...I just want to know the Qt dependencies – Ankur Shah Jun 04 '19 at 05:14
  • I don't really understand. If I understand well; you just need to log in to your redhat system and find the package names of the packages that you need; then add them in the `Requires` section. Supposing you need /some/lib.so ; you can use `rpm -qf /some/lib.so` to know which package owns that file. – Chris Maes Jun 04 '19 at 06:31