From fc3c80fca9ef9b7e6b1f39c738d3a9c23cb70377 Mon Sep 17 00:00:00 2001
From: Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
Date: Wed, 24 Aug 2005 22:46:21 +0000
Subject: [PATCH] Use .tar.gz for source package extension and tweak sdist info
 message.

---
 Distribution/Simple/SrcDist.hs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Distribution/Simple/SrcDist.hs b/Distribution/Simple/SrcDist.hs
index 46fe1d4f7c..d7c67deb40 100644
--- a/Distribution/Simple/SrcDist.hs
+++ b/Distribution/Simple/SrcDist.hs
@@ -124,11 +124,12 @@ sdist tmpDir targetPref verbose snapshot pps pkg_descr_orig = do
           unlines $ map (appendVersion date) $ lines $ contents
     else copyFileVerbose verbose descFile targetDescFile
 
+  let tarBallFilePath = targetPref `joinFileName` tarBallName pkg_descr
   system $ "(cd " ++ tmpDir
            ++ ";tar cf - " ++ (nameVersion pkg_descr) ++ ") | gzip -9 >"
-           ++ (targetPref `joinFileName` (tarBallName pkg_descr))
+           ++ tarBallFilePath
   system $ "rm -rf " ++ tmpDir
-  putStrLn "Source tarball created."
+  putStrLn $ "Source tarball created: " ++ tarBallFilePath
 
   where
     updatePackage f pd = pd { package = f (package pd) }
@@ -167,7 +168,7 @@ copyFileTo verbose dir file = do
 
 -- |The file name of the tarball
 tarBallName :: PackageDescription -> FilePath
-tarBallName p = (nameVersion p) ++ ".tgz"
+tarBallName p = (nameVersion p) ++ ".tar.gz"
 
 nameVersion :: PackageDescription -> String
 nameVersion = showPackageId . package
-- 
GitLab