anchor.diff:  # noop
   
   %install
  -# some rpm implementations delete the build dir and then recreate it by
  -# default, for some reason. Whatever, let's work around it.
  -cd $RPM_BUILD_ROOT
  -tar -zxf %SOURCE0
  +<% files.each do |path| -%>
  +<%   source = File.join(staging_path, path) -%>
  +<%   # Copy to the build_path/BUILD/ to make rpmbuild happy -%>
  +<%   target = File.join(build_path, "BUILD", path) -%>
  +<%   dir = File.dirname(target) %>
  +mkdir -p "<%= dir %>"
  +if [ -f "<%= source %>" ] ; then
  +  cp "<%= source %>" "<%= target %>"
  +elif [ -d "<%= source %>" ] ; then
  +  mkdir "<%= target %>"
  +fi
  +<% end %>
   
   %clean
  -rm -rf $RPM_BUILD_ROOT
  +# noop
   
   <% if scripts["pre-install"] -%>
   %pre
  
positive.code: %define __jar_repack 0
  
  Name: <%= name %>
  Version: <%= version %>
  
negative.code: AutoReqProv: no
  
  Group: <%= category %>
  License: <%= license %>
  Vendor: <%= vendor %>
  URL: <%= url or "http://nourlgiven.example.com/" %>
  Packager: <%= maintainer %>
  
  <% dependencies.each do |req| -%>
  Requires: <%= req %>
  <% end -%>
  <% provides.each do |prov| -%>
  Provides: <%= prov %>
  