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

Safe HaskellNone




selfDependency :: PackageIdentifier -> Dependency_ -> BoolSource

In cabal a self dependency probably means the library is needed while building the executables. In debian it would mean that the package needs an earlier version of itself to build, so we use this to filter such dependencies out.

allBuildDepends :: Atoms -> [Dependency] -> [Dependency] -> [Dependency] -> [String] -> [Dependency_]Source

Debian packages don't have per binary package build dependencies, so we just gather them all up here.

dependencies :: Atoms -> PackageType -> PackageName -> VersionRange -> RelationsSource

Turn a cabal dependency into debian dependencies. The result needs to correspond to a single debian package to be installed, so we will return just an OrRelation.

debianName :: PkgName name => Atoms -> PackageType -> PackageIdentifier -> nameSource

Function that applies the mapping from cabal names to debian names based on version numbers. If a version split happens at v, this will return the ltName if < v, and the geName if the relation is >= v.

debNameFromType :: Control' String -> DebType -> Maybe BinPkgNameSource

Given a control file and a DebType, look for the binary deb with the corresponding suffix and return its name.