Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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

You'll need to use a conditional for this.

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

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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