def write_rpm_spec
      # Create a map of scripts that exist and their contents
      scripts = SCRIPT_MAP.inject({}) do |hash, (source, destination)|
        path =  File.join(project.package_scripts_path, source.to_s)

        if File.file?(path)
          hash[destination] = File.read(path)
        end

        hash
      end

      # Get a list of all files
      files = FileSyncer.glob("#{build_dir}/**/*")
                .map { |path| build_filepath(path) }

      render_template(resource_path("spec.erb"),
        destination: spec_file,
        variables: {
          name: safe_base_package_name,
          version: safe_version,
          iteration: safe_build_iteration,
          vendor: vendor,
          license: license,
          dist_tag: dist_tag,
          maintainer: project.maintainer,
          homepage: project.homepage,
          description: project.description,
          priority: priority,
          category: category,
          conflicts: project.conflicts,
          replaces: project.replaces,
          dependencies: project.runtime_dependencies,
          user: project.package_user,
          group: project.package_group,
          scripts: scripts,
          config_files: config_files,
          files: files,
          build_dir: build_dir,
          platform_family: Ohai["platform_family"],
          compression: compression,
        }
      )
    end
def write_rpm_spec
      # Create a map of scripts that exist and their contents
      scripts = SCRIPT_MAP.inject({}) do |hash, (source, destination)|
        path =  File.join(project.package_scripts_path, source.to_s)

        if File.file?(path)
          hash[destination] = File.read(path)
        end

        hash
      end

      # Get a list of all files
      files = FileSyncer.glob("#{build_dir}/**/*")
                .map { |path| build_filepath(path) }

      render_template(resource_path("spec.erb"),
        destination: spec_file,
        variables: {
          name: safe_base_package_name,
          version: safe_version,
          iteration: safe_build_iteration,
          vendor: vendor,
          license: license,
          dist_tag: dist_tag,
          maintainer: project.maintainer,
          homepage: project.homepage,
          description: project.description,
          priority: priority,
          category: category,
          conflicts: project.conflicts,
          replaces: project.replaces,
          dependencies: project.runtime_dependencies,
          user: project.package_user,
          group: project.package_group,
          scripts: scripts,
          config_files: config_files,
          files: files,
          build_dir: build_dir,
          platform_family: Ohai["platform_family"],
          compression: compression,
        }
      )
    end
Render an rpm spec file in +SPECS/#{name}.spec+ using the supplied ERB
 template.

 @return [void]