Permalink
Browse files

Add cabal2ebuild standalone prog to Hackport.

  • Loading branch information...
1 parent 710dfef commit 392730d71022500b4878d67da10fd5dda326713a Duncan Coutts committed Dec 15, 2005
Showing with 19 additions and 1 deletion.
  1. +0 −1 HackPort/Main.hs
  2. +16 −0 HackPort/cabal2ebuild.hs
  3. +3 −0 HackPort/hackport.cabal
View
@@ -15,7 +15,6 @@ import qualified Data.Set as Set
import Action
import Error
import GenerateEbuild
-import Cabal2Ebuild
import Bash
import Config
import Diff
View
@@ -0,0 +1,16 @@
+module Main where
+
+import System.Environment
+import qualified Distribution.PackageDescription as Cabal (readPackageDescription)
+import Cabal2Ebuild
+
+main :: IO ()
+main = do
+ args <- getArgs
+ case args of
+ [cabalFileName] -> do
+ pkg <- Cabal.readPackageDescription cabalFileName
+ let ebuild = cabal2ebuild pkg
+ let ebuildFileName = name ebuild ++ "-" ++ version ebuild ++ ".ebuild"
+ writeFile ebuildFileName (showEBuild ebuild)
+ _ -> putStrLn "usage: cabal2ebuild package.cabal"
View
@@ -7,3 +7,6 @@ Synopsis: Hackage and Portage integration tool
Executable: hackport
Main-Is: Main.hs
+
+Executable: cabal2ebuild
+Main-Is: cabal2ebuild.hs

0 comments on commit 392730d

Please sign in to comment.