packages feed

debian-build 0.9.1.0 → 0.9.2.0

raw patch · 3 files changed

+28/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Debian.Package.Build.Sequence: findGeneratedSource :: MaybeT Build (FilePath, Source, Hackage)

Files

debian-build.cabal view
@@ -1,5 +1,5 @@ name:                debian-build-version:             0.9.1.0+version:             0.9.2.0 synopsis:            Debian package build sequence tools description:         This package provides build sequence functions                      for debian package, and includes on-the-fly@@ -9,7 +9,7 @@ license-file:        LICENSE author:              Kei Hibino maintainer:          ex8k.hibino@gmail.com-copyright:           Copyright (c) 2014, 2015 Kei Hibino+copyright:           Copyright (c) 2014-2016 Kei Hibino category:            Debian build-type:          Simple cabal-version:       >=1.10@@ -42,6 +42,7 @@ executable odebuild   build-depends:       base <5                      , filepath+                     , transformers                      , debian-build    main-is: odebuild.hs
mains/odebuild.hs view
@@ -1,4 +1,5 @@ import Control.Monad (void, when, (>=>))+import Control.Monad.Trans.Maybe (MaybeT (..)) import Data.Maybe (listToMaybe) import System.Environment (getProgName, getArgs) import System.Console.GetOpt@@ -10,7 +11,7 @@ import Debian.Package.Build   (BuildMode (Dep, Indep, Src), debi', pwd,    defaultConfig, Build, runBuild, liftTrace,-   removeBuildDir, findDebianChanges, genSources, removeGhcLibrary)+   removeBuildDir, findDebianChanges, genSources, findGeneratedSource, removeGhcLibrary)   remove' :: Hackage -> Build ()@@ -109,6 +110,17 @@   maybe (return ()) remove' mayH   install' +compile :: ODebuildOptions -> [String] -> [String] -> Build (Source, Hackage)+compile opts _ debArgs = do+  (dir, src, hkg) <- maybe (fail "generated source not found") return =<< runMaybeT findGeneratedSource+  liftTrace $ Command.build dir (buildModes opts []) (installDeps opts) debArgs+  return (src, hkg)++compileInstall :: ODebuildOptions -> [String] -> [String] -> Build ()+compileInstall opts x debArgs = do+  void $ compile opts x debArgs+  install'+ run :: Build a -> IO a run b = do   cur <- pwd@@ -147,6 +159,8 @@         "build"         ->    void $ runArgs build as1         "install"       ->    runArgs install as1         "reinstall"     ->    runArgs reinstall as1+        "compile"       ->    void $ runArgs compile as1+        "compile-i"     ->    runArgs compileInstall as1         _               ->    void $ runArgs build as2      []                  ->    run . void $ build defaultOptions [] []
src/Debian/Package/Build/Sequence.hs view
@@ -1,6 +1,6 @@ -- | -- Module      : Debian.Package.Build.Sequence--- Copyright   : 2014-2015 Kei Hibino+-- Copyright   : 2014-2016 Kei Hibino -- License     : BSD3 -- -- Maintainer  : ex8k.hibino@gmail.com@@ -24,7 +24,7 @@         , genSources -       , findGeneratedSourceDir+       , findGeneratedSourceDir, findGeneratedSource,        ) where  import System.FilePath ((</>), takeFileName, takeDirectory, takeBaseName)@@ -286,3 +286,11 @@     , f `notElem` [".", ".."]     , let path = bd </> f     ]++-- | Probe generated source informations+findGeneratedSource :: MaybeT Build (FilePath, Source, Hackage)+findGeneratedSource = do+  srcDir <- findGeneratedSourceDir+  src    <- lift . liftTrace $ dpkgParseChangeLog $ srcDir </> "debian" </> "changelog"+  hname <- takeBaseName <$> findCabalDescription+  return (srcDir, src, hackage $ haskellPackageFromPackage hname src)