     end
   end
 
+  defp rpm_file_name(name, version), do: "#{name}-#{version}-0.rpm"
+
 end

        """
      else
        System.cmd "#{config.rpmbuild} #{config.rpmbuild_opts} #{spec_path}"
      end 
    else
      error "Could not find the release file #{config.app_tar_path}"

    build_dir = config |> Map.get(:build_dir, Path.join([File.cwd!, "_build", "rpm"]))
    config
      |> Map.merge(%{ 
        priv:          config |> Map.get(:priv_path, Path.join([__DIR__, "..", "..", "priv"]) |> Path.expand),
        build_dir:     build_dir,
        app_name:      app_name,
        app_tar_path:  Path.join([File.cwd!, "rel", name, app_name]),
        target_rpm_path: Path.join([File.cwd!, "rel", name, "releases", version, rpm_file_name(name, version)]),
        sources_path:  Path.join([build_dir, "SOURCES", app_name]),
        init_dir:      Path.join(["etc", "init.d"]),
        rpmbuild:      "/usr/bin/rpmbuild",
