I am building an RPM which right now marks openjdk-6 as requirement; I would like to add support for openjdk-7 as well; but I am not sure how would I modify the spec file to look for either openjdk6 or openjdk7 as requirement. I read about the concept of virtual package and I am trying to use it. I am adding
Requires: libjvm.so
in my spec; and checking for either 6 or 7 in my %pre section. But the built RPM package is not recognizing libjvm.so .
error: Failed dependencies:
libjvm.so is needed by myapp.x86_64
I tried rpm -q --provides java-1.6.0-openjdk and it lists
libjvm.so()(64bit)
libjvm.so(SUNWprivate_1.1)(64bit)
Am I doing the virtual package dep wrong? Is there a more cleaner/obvious way to mention either or JDK6/7 as dependency?