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

Safe HaskellNone





data Atoms Source

Bits and pieces of information about the mapping from cabal package names and versions to debian package names and versions. In essence, an Atoms value represents a package's debianization. The lenses in this module are used to get and set the values hidden in this Atoms value. Many of the values should be left alone to be set when the debianization is finalized.

Modes of operation

verbosity :: Lens Atoms IntSource

Set how much progress messages get generated.

dryRun :: Lens Atoms BoolSource

Don't write anything, just output a description of what would have happened

validate :: Lens Atoms BoolSource

Make sure the version number and package names of the generated debianization match the

debAction :: Lens Atoms DebActionSource

Debianize, SubstVars, or Usage. I'm no longer sure what SubstVars does, but someone may still be using it.

flags :: Lens Atoms FlagsSource

Obsolete record containing verbosity, dryRun, validate, and debAction.

Cabal info

compilerVersion :: Lens Atoms (Maybe Version)Source

Set the compiler version, this is used when loading the cabal file to

packageDescription :: Lens Atoms (Maybe PackageDescription)Source

The information loaded from the cabal file.

buildDir :: Lens Atoms (Maybe FilePath)Source

The build directory. This can be set by an argument to the Setup script. When Setup is run manually it is just dist, when it is run by dpkg-buildpackage the compiler name is appended, so it is typically dist-ghc. Cabal-debian needs the correct value of buildDir to find the build results.

dataDir :: Lens Atoms (Maybe FilePath)Source

The data directory for the package, generated from the packageDescription

compiler :: Lens Atoms (Maybe Compiler)Source

The Compiler value returned when the cabal file was loaded.

extraLibMap :: Lens Atoms (Map String (Set BinPkgName))Source

Map from cabal Extra-Lib names to debian binary package names.

execMap :: Lens Atoms (Map String BinPkgName)Source

Map from cabal Build-Tool names to debian binary package names.

cabalFlagAssignments :: Lens Atoms (Set (FlagName, Bool))Source

Cabal flag assignments to use when loading the cabal file.

Global debian info

versionSplits :: Lens Atoms [VersionSplits]Source

Map from cabal version number ranges to debian package names. This is a result of the fact that only one version of a debian package can be installed at a given time, while multiple versions of a cabal packages can.

epochMap :: Lens Atoms (Map PackageName Int)Source

Map of Debian epoch numbers assigned to cabal packages.

High level information about the debianization

description :: Lens Atoms (Map BinPkgName Text)Source

Map of binary deb descriptions.

executable :: Lens Atoms (Map BinPkgName InstallFile)Source

Create a package to hold a cabal executable

serverInfo :: Lens Atoms (Map BinPkgName Server)Source

Create a package for an operating service using the given executable

website :: Lens Atoms (Map BinPkgName Site)Source

Create a package for a website using the given executable as the server

backups :: Lens Atoms (Map BinPkgName String)Source

Generate a backups package using the given cabal executable

apacheSite :: Lens Atoms (Map BinPkgName (String, FilePath, Text))Source

Create an apache configuration file with the given (domain, logdir, filetext). This is called when expanding the result of the website lens above.

missingDependencies :: Lens Atoms (Set BinPkgName)Source

List if packages that should be omitted from any dependency list - e.g. a profiling package missing due to use of noProfilingPackage lens elsewhere.

utilsPackageName :: Lens Atoms (Maybe BinPkgName)Source

Override the package name used to hold left over data files and executables

sourcePackageName :: Lens Atoms (Maybe SrcPkgName)Source

Override the debian source package name constructed from the cabal name

revision :: Lens Atoms (Maybe String)Source

Revision string used in constructing the debian verison number from the cabal version

debVersion :: Lens Atoms (Maybe DebianVersion)Source

Exact debian version number, overrides the version generated from the cabal version

maintainer :: Lens Atoms (Maybe NameAddr)Source

Maintainer field. Overrides any value found in the cabal file, or in the DEBIANMAINTAINER environment variable.

packageInfo :: Lens Atoms (Map PackageName PackageInfo)Source

No longer sure what the purpose of this lens is.

omitLTDeps :: Lens Atoms BoolSource

Set this to filter any less-than dependencies out of the generated debian dependencies. (Not sure if this is implemented.)

noProfilingLibrary :: Lens Atoms BoolSource

Set this to omit the prof library deb.

noDocumentationLibrary :: Lens Atoms BoolSource

Set this to omit the doc library deb.

copyright :: Lens Atoms (Maybe (Either License Text))Source

The copyright information

sourceArchitecture :: Lens Atoms (Maybe PackageArchitectures)Source

The source package architecture - Any, All, or some list of specific architectures.

binaryArchitectures :: Lens Atoms (Map BinPkgName PackageArchitectures)Source

Map of the binary package architectures

sourcePriority :: Lens Atoms (Maybe PackagePriority)Source

The source package priority

binaryPriorities :: Lens Atoms (Map BinPkgName PackagePriority)Source

Map of the binary package priorities

sourceSection :: Lens Atoms (Maybe Section)Source

The source package's section assignment

binarySections :: Lens Atoms (Map BinPkgName Section)Source

Map of the binary deb section assignments

buildDeps :: Lens Atoms (Set BinPkgName)Source

Build dependencies

buildDepsIndep :: Lens Atoms (Set BinPkgName)Source

Architecture independent

depends :: Lens Atoms (Map BinPkgName (Set Relation))Source

Map of extra install dependencies for the package's binary debs. This should be [[Relation]] for full generality, or Set (Set Relation)

conflicts :: Lens Atoms (Map BinPkgName (Set Relation))Source

Map of extra install conflicts for the package's binary debs. We should support all the other dependency fields - provides, replaces, etc.

extraDevDeps :: Lens Atoms (Set BinPkgName)Source

Extra install dependencies for the devel library. Redundant with depends, but kept for backwards compatibility. Also, I think maybe this is or was needed because it can be set before the exact name of the library package is known.

Debianization files and file fragments

rulesHead :: Lens Atoms (Maybe Text)Source

The beginning of the rules file

rulesFragments :: Lens Atoms (Set Text)Source

Additional fragments of the rules file

postInst :: Lens Atoms (Map BinPkgName Text)Source

Map of debian/postinst scripts

postRm :: Lens Atoms (Map BinPkgName Text)Source

Map of debian/postrm scripts

preInst :: Lens Atoms (Map BinPkgName Text)Source

Map of debian/preinst scripts

preRm :: Lens Atoms (Map BinPkgName Text)Source

Map of debian/prerm scripts

compat :: Lens Atoms (Maybe Int)Source

The debian/compat file, contains the minimum compatible version of the debhelper package

sourceFormat :: Lens Atoms (Maybe SourceFormat)Source

The debiansourceformat file.

watch :: Lens Atoms (Maybe Text)Source

the debian/watch file

changelog :: Lens Atoms (Maybe ChangeLog)Source

the debian/changelog file

comments :: Lens Atoms (Maybe [[Text]])Source

Comment entries for the latest changelog entry (DebLogComments [[Text]])

control :: Lens Atoms SourceDebDescriptionSource

The debian/control file.

standards :: Lens Atoms (Maybe StandardsVersion)Source

The Standards-Version field of the debian/control file

install :: Lens Atoms (Map BinPkgName (Set (FilePath, FilePath)))Source

Install files into directories

installTo :: Lens Atoms (Map BinPkgName (Set (FilePath, FilePath)))Source

Rename and install files

installData :: Lens Atoms (Map BinPkgName (Set (FilePath, FilePath)))Source

Install files into the package data directory

file :: Lens Atoms (Map BinPkgName (Set (FilePath, Text)))Source

Create a file in the deb with the given text

installCabalExec :: Lens Atoms (Map BinPkgName (Set (String, FilePath)))Source

Install a cabal executable

installCabalExecTo :: Lens Atoms (Map BinPkgName (Set (String, FilePath)))Source

Rename and install a cabal executable

installDir :: Lens Atoms (Map BinPkgName (Set FilePath))Source

Create directories in the package

installInit :: Lens Atoms (Map BinPkgName Text)Source

Create an etcinit.d file in the package

intermediateFiles :: Lens Atoms (Set (FilePath, Text))Source

Create a file in the debianization. This is used to implement the file lens above.