cabal-debian-4.15.2: Create a debianization for a cabal package

Safe HaskellNone




Convert between cabal and debian package names based on version number ranges.



newtype DebBase Source

The base of a debian binary package name, the string that appears between libghc- and -dev.


DebBase String 

Combinators for VersionSplits

data VersionSplits Source

Describes a mapping from cabal package name and version to debian package names. For example, versions of the cabal QuickCheck package less than 2 are mapped to quickcheck1, while version 2 or greater is mapped to quickcheck2.

makePackage :: DebBase -> VersionSplitsSource

Create a version split database that assigns a single debian package name base to all cabal versions.

insertSplit :: Version -> DebBase -> VersionSplits -> VersionSplitsSource

Split the version range and give the older packages a new name.

Operators on VersionSplits

cabalFromDebian :: Map PackageName VersionSplits -> DebBase -> DebianVersion -> PackageNameSource

Brute force implementation - I'm assuming this is not a huge map.

cabalFromDebian' :: Map PackageName VersionSplits -> DebBase -> Version -> PackageIdentifierSource

debianFromCabal :: VersionSplits -> PackageIdentifier -> DebBaseSource

doSplits :: VersionSplits -> Maybe VersionReq -> DebBaseSource

Given a version split database, turn the debian version requirements into a debian package name base that ought to satisfy them.