anchor.diff:  %files
   %defattr(-,root,root,-)
   <%# Output config files and then regular files. -%>
  -<%= @config_files.collect { |c| '%config ' + c }.join("\n") %>
  -<%= paths.join("\n") %>
  +<%= @config_files.collect { |c| '%config ' + c }.join("\n") -%>
  +<%# list only files, not directories? %>
  +<%= files.reject { |f| File.directory?(File.join(staging_path, f)) }.collect { |f| "/#{f}" }.join("\n") %>
   
   %changelog
  
positive.code: # 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
  
  %clean
  rm -rf $RPM_BUILD_ROOT
  
  <% if scripts["pre-install"] -%>
  %pre
  
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 %>
  