Skip to content

Commit

Permalink
Correct typos and remove unneeded "|| return 1".
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy Oudompheng committed Oct 14, 2010
1 parent 0a16e78 commit 8e6ef36
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-- TODO: if build-type: Configure, accurate C library dependecies
-- require downloading the source, and running configure
--
-- C libraries are dynamicall linked, should be listed in depends,
-- C libraries are dynamically linked, should be listed in depends,
-- rather than makedepends

import Distribution.Package
Expand Down Expand Up @@ -350,7 +350,7 @@ findCLibs (PackageDescription { library = lib, executables = exe }) =
Nothing -> []
Just l -> extraLibs (libBuildInfo l) ++
map (\(Dependency (PackageName n) _) ->
if '-' `elem` n
if '-' `elem` n
then reverse . drop 1 . dropWhile (/= '-') . reverse $ n
else n)
(pkgconfigDepends (libBuildInfo l))
Expand Down Expand Up @@ -531,13 +531,13 @@ gtkLibs = map PackageName
-}

--
-- | Tranlsate a generic cabal file into a PGKBUILD
-- | Translate a generic cabal file into a PGKBUILD
--
cabal2pkg :: PackageDescription -> (PkgBuild, Maybe String)
cabal2pkg cabal

-- TODO decide if its a library or an executable,
-- handle mullltipackages
-- TODO decide if it's a library or an executable,
-- handle multipackages
-- extract C dependencies

-- = trace (show cabal) $
Expand Down Expand Up @@ -586,28 +586,28 @@ cabal2pkg cabal

, arch_build =
[ "cd ${srcdir}/" </> display name <-> display vers
, "runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname} || return 1"
, "runhaskell Setup build || return 1"
, "runhaskell Setup configure --prefix=/usr --docdir=/usr/share/doc/${pkgname}"
, "runhaskell Setup build"
] ++

-- Only needed for libraries:
(if hasLibrary
then
[ "runhaskell Setup haddock || return 1"
, "runhaskell Setup register --gen-script || return 1"
, "runhaskell Setup unregister --gen-script || return 1"
[ "runhaskell Setup haddock"
, "runhaskell Setup register --gen-script"
, "runhaskell Setup unregister --gen-script"
, "install -D -m744 register.sh ${pkgdir}/usr/share/haskell/$pkgname/register.sh"
, "install -m744 unregister.sh ${pkgdir}/usr/share/haskell/$pkgname/unregister.sh"
, "install -d -m755 $pkgdir/usr/share/doc/ghc/html/libraries"
, "ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/" ++ (display name)
]
else [])
++
["runhaskell Setup copy --destdir=${pkgdir} || return 1"]
["runhaskell Setup copy --destdir=${pkgdir}"]
++
(if not (null (licenseFile cabal)) && (case license cabal of GPL {} -> False; LGPL {} -> False; _ -> True)
then
[ "install -D -m644 " ++ licenseFile cabal ++ " ${pkgdir}/usr/share/licenses/$pkgname/LICENSE || return 1"
[ "install -D -m644 " ++ licenseFile cabal ++ " ${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
, "rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
]
else [])
Expand Down

0 comments on commit 8e6ef36

Please sign in to comment.