title: How to auto increment RPM version only if files are changed
body: <p>How does the linux distro's like Redhat, SLES build their RPMs. The main task I want to understand is how does their build system identify only a changed files in a particular RPM and then increment the RPM version?</p>
  
  <p>I have tried few ways to achieve this task. 
  1) I tried using indexing mechanism where I tried tracking all the files part of the RPM along with their md5sum and timestamp and then increment the version of the RPM if any of the file md5sum value is changed. 
  But this approach is not scalable. Is there any build software which can be leveraged for the same?</p>