3

So, I'm trying to fix a spec file right now for rpmbuild.

On Suse, it looks like the X11 library development package is named "xorg-x11-libX11-devel" while on CentOS it seems to be named "libX11-devel". In an ideal universe, I could just use some magical binary operator to require one or the other. Something like:

BuildRequires:  xorg-x11-libX11-devel || libX11-devel

Does something like that exist, or do I need to script some sort of zainy thing to get this to work?

  • Is there a specific header file, e.g. /usr/include/X11/X11.h, that you can require instead? – Aaron D. Marasco Apr 26 '13 at 1:07
7

You'll need to use a conditional for this.

%if 0%{?suse_version}      # any version of SuSE
BuildRequires: libX11-devel
%else
BuildRequires: xorg-x11-libX11-devel
%endif

Further information can be found from OpenSUSE and Fedora wikis respectively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.