cabal-debian-4.32: Create a Debianization for a Cabal package

Safe HaskellNone
LanguageHaskell2010

Debian.Debianize.VersionSplits

Contents

Description

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

Synopsis

Documentation

newtype DebBase Source

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

Constructors

DebBase 

Fields

unDebBase :: 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".

Constructors

VersionSplits 

Fields

oldestPackage :: DebBase

The Debian name given to versions older than the oldest split.

splits :: [(Version, DebBase)]

Each pair is The version where the split occurs, and the name to use for versions greater than or equal to that version. This list assumed to be in (must be kept in) descending version number order, newest to oldest

makePackage :: DebBase -> VersionSplits Source

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

insertSplit Source

Arguments

:: Version

Where to split the version range

-> DebBase

The name to use for versions older than the split

-> VersionSplits 
-> VersionSplits 

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

Operators on VersionSplits

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

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

doSplits :: VersionSplits -> Maybe VersionReq -> DebBase Source

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