You could try something like this: Requires: %(if test -e /usr/lib/libcurl.so.2 ; then echo "libcurl.so.2" ; else echo "libcurl.so.3" ; fi) Bob On Wed, 2004-12-22 at 12:23 +0530, Bhupinder Ahuja wrote: > Hello, > > I am creating a binary RPM package for a file viewer. > > The application links to "libcurl.so.2" dynamically. However, on systems, > where it is unable to locate "libcurl.so.2", the application looks for > "libcurl.so.3" and links dynamically. The application fails to launch if it > cannot find either of the two libraries. > > I want to include the same info in the spec file. I want that the rpm > package should show failed dependency (while doing "rpm -U") if it cannot > locate "libcurl.so.2" or "libcurl.so.3" in the user-system. > > For this I am adding the following line in my spec file: > Requires: libcurl.so <= 3 > > However, the rpm shows failed dependency on the system which has > "libcurl.so.2" or "libcurl.so.3". > I tried some other permutations (like "Requires: libcurl.so.2 <=S 3"), but > the rpm still shows failed dependency. > > Only when I explicitly mention "Requires: libcurl.so.2", the rpm > installation succeeds on the systems having "libcurl.so.2" and similarly for > "libcurl.so.3". > > What I want to know: > Is there any way by which I can specify (in the spec file), that "rpm -U" > should fail on the system which does NOT have either "libcurl.so.2" or > "libcurl.so.3". In this case the rpm package should show failed dependency. > > Thanks in advance. > -Bhupinder > > _________________________________________________________________ > Chat with 1000s of singles. > http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Let > BharatMatrimony.com's Instant Messenger show you how. > > _______________________________________________ > Rpm-list mailing list > Rpm-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/rpm-list -- Bob Kashani http://www.ocf.berkeley.edu/~bobk/garnome _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list