debian-build 0.10.1.2 → 0.10.2.0
raw patch · 3 files changed
+26/−10 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Debian.Package.Build.Command: instance GHC.Enum.Bounded Debian.Package.Build.Command.BuildMode
+ Debian.Package.Build.Command: instance GHC.Enum.Enum Debian.Package.Build.Command.BuildMode
- Debian.Package.Data.Packages: PackageArch :: (Maybe String) -> PackageType
+ Debian.Package.Data.Packages: PackageArch :: Maybe String -> PackageType
Files
- debian-build.cabal +5/−3
- mains/odebuild.hs +7/−1
- src/Debian/Package/Build/Command.hs +14/−6
debian-build.cabal view
@@ -1,5 +1,5 @@ name: debian-build-version: 0.10.1.2+version: 0.10.2.0 synopsis: Debian package build sequence tools description: This package provides build sequence functions for debian package, and includes on-the-fly@@ -9,11 +9,13 @@ license-file: LICENSE author: Kei Hibino maintainer: ex8k.hibino@gmail.com-copyright: Copyright (c) 2014-2016 Kei Hibino+copyright: Copyright (c) 2014-2019 Kei Hibino category: Debian build-type: Simple cabal-version: >=1.10-tested-with: GHC == 8.4.1, GHC == 8.4.2, GHC == 8.4.3+tested-with: GHC == 8.8.1+ , GHC == 8.6.1, GHC == 8.6.2, GHC == 8.6.3, GHC == 8.6.4, GHC == 8.6.5+ , GHC == 8.4.1, GHC == 8.4.2, GHC == 8.4.3, GHC == 8.4.4 , GHC == 8.2.1, GHC == 8.2.2 , GHC == 8.0.1, GHC == 8.0.2 , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3
mains/odebuild.hs view
@@ -1,6 +1,7 @@ import Control.Monad (void, when, (>=>)) import Control.Monad.Trans.Maybe (MaybeT (..)) import Data.Maybe (listToMaybe)+import Data.List (intercalate) import System.Environment (getProgName, getArgs) import System.Console.GetOpt (OptDescr (Option), ArgDescr (ReqArg, NoArg), ArgOrder (RequireOrder),@@ -55,12 +56,17 @@ (ReqArg (\s opts -> maybe (Left $ "Unknown build mode: " ++ s) Right $ do m <- listToMaybe [m | (m, "") <- reads s] return $ opts { buildModes = buildModes opts . (m : ) } )- "BUILD_MODE")+ modesEx) "add build-mode to build-mode list to specify" , Option ['R'] ["reuse-source"] (NoArg $ \opts -> return $ opts { reuseSource = True }) "not clean generated source directory, and build will reuse it" ]++modesEx :: String+modesEx =+ ("{" ++ ) . (++ "}") . intercalate "|" $+ map show ([minBound .. maxBound] :: [BuildMode]) parseOption :: [String] -> (ODebuildOptions -> Either String ODebuildOptions, ([String], [String]))
src/Debian/Package/Build/Command.hs view
@@ -147,14 +147,22 @@ ver <- origVersion' <$> packageVersion "cabal-debian" let revision = fromMaybe "1~autogen1" mayRev oldArgs = ["--quilt", "--revision=" ++ revision]- args <- case versionBranch ver of+ verBranch = take 2 $ versionBranch ver ++ [0,0]++ args <- case verBranch of (x:y:_) | x <= 1 -> fail $ "Version of cabal-debian is TOO OLD: "- ++ showVersion ver+ ++ "'" ++ showVersion ver ++ "'" ++ " - Under version 1 generates wrong dependencies."- | x == 4 && y >= 19 -> return ["--revision=" ++ '-' : revision]- | otherwise -> return oldArgs- _ -> return oldArgs+ | 2 <= x && x <= 3 -> return oldArgs+ | x == 4 && y < 19 -> return oldArgs+ | x >= 4 -> return ["--revision=" ++ '-' : revision]+ | otherwise -> fail+ $ "unknown version: "+ ++ "'" ++ showVersion ver ++ "'"+ _ -> fail+ $ "unexpected version format: "+ ++ "'" ++ showVersion ver ++ "'" rawSystem' "cabal-debian" $ args ++ otherArgs @@ -207,7 +215,7 @@ -- | Build mode, all or binary only data BuildMode = All | Bin | Src | Dep | Indep- deriving (Eq, Show, Read)+ deriving (Eq, Show, Read, Bounded, Enum) -- | Infer all build mode list from debian control file data modeListFromControl :: Control -> [BuildMode]