Permalink
Browse files

Add silly default homepage and src_uri.

  • Loading branch information...
1 parent 1ebb87f commit 8bc201b187ad2b0429b8ae66accd338323faea83 @jkarlson jkarlson committed Jul 10, 2010
Showing with 11 additions and 7 deletions.
  1. +8 −2 Cabal2Ebuild.hs
  2. +3 −5 Portage/EBuild.hs
View
10 Cabal2Ebuild.hs
@@ -52,8 +52,8 @@ cabal2ebuild pkg = Portage.ebuildTemplate {
E.version = display (Cabal.pkgVersion (Cabal.package pkg)),
E.description = if null (Cabal.synopsis pkg) then Cabal.description pkg
else Cabal.synopsis pkg,
- E.homepage = Cabal.homepage pkg,
- E.src_uri = Cabal.pkgUrl pkg,
+ E.homepage = thisHomepage,
+ E.src_uri = thisSRC_URI,
E.license = Cabal.license pkg,
E.my_pn = if any isUpper cabalPkgName then Just cabalPkgName else Nothing,
E.features = E.features E.ebuildTemplate
@@ -64,6 +64,12 @@ cabal2ebuild pkg = Portage.ebuildTemplate {
} where
cabalPkgName = display $ Cabal.pkgName (Cabal.package pkg)
hasExe = (not . null) (Cabal.executables pkg)
+ thisHomepage = if (null $ Cabal.homepage pkg)
+ then E.homepage E.ebuildTemplate
+ else Cabal.homepage pkg
+ thisSRC_URI = if (null $ Cabal.pkgUrl pkg)
+ then E.src_uri E.ebuildTemplate
+ else Cabal.pkgUrl pkg
convertDependencies :: Portage.Category -> [Cabal.Dependency] -> [Dependency]
convertDependencies category = concatMap (convertDependency category)
View
8 Portage/EBuild.hs
@@ -42,8 +42,8 @@ ebuildTemplate = EBuild {
version = "0.1",
hackportVersion = getHackportVersion Paths_hackport.version,
description = "",
- homepage = "",
- src_uri = "",
+ homepage = "http://hackage.haskell.org/package/${PN}",
+ src_uri = "http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz",
license = Cabal.UnknownLicense "xxx UNKNOWN xxx",
slot = "0",
keywords = ["~amd64","~x86"],
@@ -76,9 +76,7 @@ showEBuild ebuild =
ss "MY_P=". quote "${MY_PN}-${PV}". nl. nl).
ss "DESCRIPTION=". quote (description ebuild). nl.
ss "HOMEPAGE=". quote (homepage ebuild). nl.
- ss "SRC_URI=". quote (replaceVars (src_uri ebuild)).
- (if null (src_uri ebuild) then ss "\t#Fixme: please fill in manually"
- else id). nl.
+ ss "SRC_URI=". quote (replaceVars (src_uri ebuild)). nl.
nl.
ss "LICENSE=". quote (convertLicense . license $ ebuild).
(if null (licenseComment . license $ ebuild) then id

0 comments on commit 8bc201b

Please sign in to comment.