title: How to abort the installation of an rpm package if some conditions are not met in specfile?
body: <p>There are some more things that the <code>Requires</code> tag does not satisfy.
  So i wrote a script to verify these things but where do I place them ?
  And if not found then i want to quit installation prompting user to do the steps before attempting to install this rpm again.</p>
  
  <p>writing <code>exit 1</code> in <code>%install</code> tag fails to build the rpm using rpmbuild.
  says <code>%install has a bad exit code.</code></p>
  
  <p><strong>EDIT:</strong> let me provide you an example. What i initially wanted to test was is if Oracle Java 6 is present. If not then provide the path to Java6. If user fails to provide one ... exit the RPM. Higher Java is not allowed and installation should not be successful without java. Cannot place it in Requires for a point if user does not want to install a java rpm package.</p>
  
  <p>Hope i got my point through.</p>