 
     contents = File.read!(spec)
     |> String.replace(@_NAME, config.name)
-    |> String.replace(@_VERSION, config.version)
+    |> String.replace(@_VERSION, config.version |> normalize_version)
     |> String.replace(@_TOPDIR, config.build_dir)
     |> String.replace(@_BUILD_ARCH, config.build_arch)
     |> String.replace(@_SUMMARY, config.summary)


  defp do_config(%Config{name: name, version: version} = config) do
    app_name   = "#{name}-#{version}.tar.gz"
    build_dir  = config |> get_config_item(:build_dir,  build_dir())
    build_arch = config |> get_config_item(:build_arch, @_DEFAULT_BUILD_ARCH)


  end

  def rpm_file_name(name, version, arch, match \\ false),
    do: "#{name}-#{version |> normalize_version}-0.#{if match, do: "*", else: ""}#{arch}.rpm"

  def get_config_item(config, item, default) do
    app    = String.to_atom config.name
