Safe Haskell | None |
---|---|
Language | Haskell98 |
This module holds a long list of lenses that access the Atoms record, the record that holds the input data from which the debianization is to be constructed.
- data Atoms = Atoms {
- noDocumentationLibrary_ :: Bool
- noProfilingLibrary_ :: Bool
- omitProfVersionDeps_ :: Bool
- omitLTDeps_ :: Bool
- buildDir_ :: Set FilePath
- buildEnv_ :: EnvSet
- flags_ :: Flags
- debianNameMap_ :: Map PackageName VersionSplits
- control_ :: SourceDebDescription
- sourcePackageName_ :: Maybe SrcPkgName
- overrideDebianNameBase_ :: Maybe DebBase
- revision_ :: Maybe String
- debVersion_ :: Maybe DebianVersion
- maintainerOption_ :: Maybe NameAddr
- uploadersOption_ :: [NameAddr]
- cabalFlagAssignments_ :: Set (FlagName, Bool)
- sourceFormat_ :: Maybe SourceFormat
- watch_ :: Maybe Text
- intermediateFiles_ :: Set (FilePath, Text)
- rulesHead_ :: Maybe Text
- rulesSettings_ :: [Text]
- rulesIncludes_ :: [Text]
- rulesFragments_ :: Set Text
- warning_ :: Set Text
- utilsPackageNameBase_ :: Maybe String
- xDescription_ :: Maybe Text
- changelog_ :: Maybe ChangeLog
- comments_ :: Maybe [[Text]]
- missingDependencies_ :: Set BinPkgName
- extraLibMap_ :: Map String Relations
- execMap_ :: Map String Relations
- epochMap_ :: Map PackageName Int
- packageInfo_ :: Map PackageName PackageInfo
- compat_ :: Maybe Int
- copyright_ :: CopyrightDescription
- apacheSite_ :: Map BinPkgName (String, FilePath, Text)
- logrotateStanza_ :: Map BinPkgName (Set Text)
- postInst_ :: Map BinPkgName Text
- postRm_ :: Map BinPkgName Text
- preInst_ :: Map BinPkgName Text
- preRm_ :: Map BinPkgName Text
- sourceArchitecture_ :: Maybe PackageArchitectures
- binaryArchitectures_ :: Map BinPkgName PackageArchitectures
- sourcePriority_ :: Maybe PackagePriority
- binaryPriorities_ :: Map BinPkgName PackagePriority
- sourceSection_ :: Maybe Section
- binarySections_ :: Map BinPkgName Section
- atomSet_ :: Set Atom
- installInit_ :: Map BinPkgName Text
- executable_ :: Map BinPkgName InstallFile
- serverInfo_ :: Map BinPkgName Server
- website_ :: Map BinPkgName Site
- backups_ :: Map BinPkgName String
- extraDevDeps_ :: Relations
- packageDescription_ :: Maybe PackageDescription
- compilerFlavors_ :: Set CompilerFlavor
- official_ :: Bool
- data Atom
- = Link BinPkgName FilePath FilePath
- | Install BinPkgName FilePath FilePath
- | InstallTo BinPkgName FilePath FilePath
- | InstallData BinPkgName FilePath FilePath
- | File BinPkgName FilePath Text
- | InstallCabalExec BinPkgName String FilePath
- | InstallCabalExecTo BinPkgName String FilePath
- | InstallDir BinPkgName FilePath
- type Atoms' = Set Atom
- data EnvSet = EnvSet {}
- newAtoms :: MonadIO m => m Atoms
- makeAtoms :: EnvSet -> Atoms
- data Flags = Flags {
- verbosity_ :: Int
- dryRun_ :: Bool
- validate_ :: Bool
- debAction_ :: DebAction
- data DebAction
- data DebType
- data PackageInfo = PackageInfo {
- cabalName :: PackageName
- devDeb :: Maybe (BinPkgName, DebianVersion)
- profDeb :: Maybe (BinPkgName, DebianVersion)
- docDeb :: Maybe (BinPkgName, DebianVersion)
- data Site = Site {}
- data Server = Server {
- hostname :: String
- port :: Int
- headerMessage :: String
- retry :: String
- serverFlags :: [String]
- installFile :: InstallFile
- data InstallFile = InstallFile {}
- defaultFlags :: Flags
- showAtoms :: Atoms -> IO ()
- verbosity :: Lens Atoms Int
- dryRun :: Lens Atoms Bool
- validate :: Lens Atoms Bool
- debAction :: Lens Atoms DebAction
- flags :: Lens Atoms Flags
- warning :: Lens Atoms (Set Text)
- buildDir :: Lens Atoms (Set FilePath)
- buildEnv :: Lens Atoms EnvSet
- setBuildEnv :: MonadIO m => EnvSet -> Atoms -> m Atoms
- extraLibMap :: Lens Atoms (Map String Relations)
- execMap :: Lens Atoms (Map String Relations)
- maintainerOption :: Lens Atoms (Maybe NameAddr)
- uploadersOption :: Lens Atoms [NameAddr]
- cabalFlagAssignments :: Lens Atoms (Set (FlagName, Bool))
- packageDescription :: Lens Atoms (Maybe PackageDescription)
- debianNameMap :: Lens Atoms (Map PackageName VersionSplits)
- epochMap :: Lens Atoms (Map PackageName Int)
- executable :: Lens Atoms (Map BinPkgName InstallFile)
- serverInfo :: Lens Atoms (Map BinPkgName Server)
- website :: Lens Atoms (Map BinPkgName Site)
- backups :: Lens Atoms (Map BinPkgName String)
- apacheSite :: Lens Atoms (Map BinPkgName (String, FilePath, Text))
- missingDependencies :: Lens Atoms (Set BinPkgName)
- utilsPackageNameBase :: Lens Atoms (Maybe String)
- sourcePackageName :: Lens Atoms (Maybe SrcPkgName)
- overrideDebianNameBase :: Lens Atoms (Maybe DebBase)
- revision :: Lens Atoms (Maybe String)
- debVersion :: Lens Atoms (Maybe DebianVersion)
- packageInfo :: Lens Atoms (Map PackageName PackageInfo)
- omitProfVersionDeps :: Lens Atoms Bool
- omitLTDeps :: Lens Atoms Bool
- noProfilingLibrary :: Lens Atoms Bool
- noDocumentationLibrary :: Lens Atoms Bool
- official :: Lens Atoms Bool
- copyright :: Lens Atoms CopyrightDescription
- sourceArchitectures :: Lens Atoms (Maybe PackageArchitectures)
- extraDevDeps :: Lens Atoms Relations
- rulesHead :: Lens Atoms (Maybe Text)
- rulesSettings :: Lens Atoms [Text]
- rulesIncludes :: Lens Atoms [Text]
- rulesFragments :: Lens Atoms (Set Text)
- postInst :: Lens Atoms (Map BinPkgName Text)
- postRm :: Lens Atoms (Map BinPkgName Text)
- preInst :: Lens Atoms (Map BinPkgName Text)
- preRm :: Lens Atoms (Map BinPkgName Text)
- compat :: Lens Atoms (Maybe Int)
- sourceFormat :: Lens Atoms (Maybe SourceFormat)
- watch :: Lens Atoms (Maybe Text)
- changelog :: Lens Atoms (Maybe ChangeLog)
- xDescription :: Lens Atoms (Maybe Text)
- comments :: Lens Atoms (Maybe [[Text]])
- control :: Lens Atoms SourceDebDescription
- logrotateStanza :: Lens Atoms (Map BinPkgName (Set Text))
- atomSet :: Lens Atoms (Set Atom)
- link :: Monad m => BinPkgName -> FilePath -> FilePath -> StateT Atoms m ()
- install :: Monad m => BinPkgName -> FilePath -> FilePath -> StateT Atoms m ()
- installTo :: Monad m => BinPkgName -> FilePath -> FilePath -> StateT Atoms m ()
- installData :: Monad m => BinPkgName -> FilePath -> FilePath -> StateT Atoms m ()
- file :: Monad m => BinPkgName -> FilePath -> Text -> StateT Atoms m ()
- installCabalExec :: Monad m => BinPkgName -> String -> FilePath -> StateT Atoms m ()
- installCabalExecTo :: Monad m => BinPkgName -> String -> FilePath -> StateT Atoms m ()
- installDir :: Monad m => BinPkgName -> FilePath -> StateT Atoms m ()
- installInit :: Lens Atoms (Map BinPkgName Text)
- intermediateFiles :: Lens Atoms (Set (FilePath, Text))
- compilerFlavors :: Lens Atoms (Set CompilerFlavor)
Documentation
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.
Atoms | |
|
Link BinPkgName FilePath FilePath | Create a symbolic link in the binary package |
Install BinPkgName FilePath FilePath | Install a build file into the binary package |
InstallTo BinPkgName FilePath FilePath | Install a build file into the binary package at an exact location |
InstallData BinPkgName FilePath FilePath | DHInstallTo somewhere relative to DataDir (see above) |
File BinPkgName FilePath Text | Create a file with the given text at the given path |
InstallCabalExec BinPkgName String FilePath | Install a cabal executable into the binary package |
InstallCabalExecTo BinPkgName String FilePath | Install a cabal executable into the binary package at an exact location |
InstallDir BinPkgName FilePath | Create a directory in the binary package |
newAtoms :: MonadIO m => m Atoms Source
Look for --buildenvdir in the command line arguments to get the changeroot path, use "/" if not present.
This record supplies information about the task we want done - debianization, validataion, help message, etc.
Flags | |
|
A redundant data type, too lazy to expunge.
data PackageInfo Source
PackageInfo | |
|
Information about the web site we are packaging.
Information about the server we are packaging.
Server | |
|
dryRun :: Lens Atoms Bool Source
Don't write anything, just output a description of what would have happened
validate :: Lens Atoms Bool Source
Make sure the version number and package names of the supplied and generated debianizations match.
debAction :: Lens Atoms DebAction Source
Debianize, SubstVars, or Usage. I'm no longer sure what SubstVars does, but someone may still be using it.
flags :: Lens Atoms Flags Source
Obsolete record containing verbosity, dryRun, validate, and debAction.
buildDir :: Lens Atoms (Set 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.
extraLibMap :: Lens Atoms (Map String Relations) Source
Map from cabal Extra-Lib names to debian binary package names.
execMap :: Lens Atoms (Map String Relations) 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.
packageDescription :: Lens Atoms (Maybe PackageDescription) Source
The result of loading a .cabal file
debianNameMap :: Lens Atoms (Map PackageName 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 package can.
epochMap :: Lens Atoms (Map PackageName Int) Source
Map of Debian epoch numbers assigned to cabal packages.
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 a server
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.
Lower level hints about the debianization
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.
utilsPackageNameBase :: Lens Atoms (Maybe String) 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
overrideDebianNameBase :: Lens Atoms (Maybe DebBase) Source
Override the default base of the debian binary package names.
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
packageInfo :: Lens Atoms (Map PackageName PackageInfo) Source
No longer sure what the purpose of this lens is.
omitProfVersionDeps :: Lens Atoms Bool Source
Do not put the version dependencies on the prof packages that we put on the dev packages.
omitLTDeps :: Lens Atoms Bool Source
Set this to filter any less-than dependencies out of the generated debian dependencies. (Not sure if this is implemented.)
noProfilingLibrary :: Lens Atoms Bool Source
Set this to omit the prof library deb.
noDocumentationLibrary :: Lens Atoms Bool Source
Set this to omit the doc library deb.
copyright :: Lens Atoms CopyrightDescription Source
The copyright information from the cabal file
sourceArchitectures :: Lens Atoms (Maybe PackageArchitectures) Source
The architectures supported by this source package - Any
,
All
, or some list of specific architectures.
extraDevDeps :: Lens Atoms Relations 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.
rulesSettings :: Lens Atoms [Text] Source
The rules file assignments
rulesIncludes :: Lens Atoms [Text] Source
The rules file include directives
compat :: Lens Atoms (Maybe Int) Source
The debian/compat
file, contains the minimum compatible version
of the debhelper
package. If not given the version number of the
installed debhelper package is used.
sourceFormat :: Lens Atoms (Maybe SourceFormat) Source
The debian/source/format
file.
comments :: Lens Atoms (Maybe [[Text]]) Source
Comment entries for the latest changelog entry (DebLogComments [[Text]])
control :: Lens Atoms SourceDebDescription Source
The debian/control
file. Many of the following lenses access parts of the SourceDebDescription
.
logrotateStanza :: Lens Atoms (Map BinPkgName (Set Text)) Source
Add a stanza to the binary package's logrotate script.
installData :: Monad m => BinPkgName -> FilePath -> FilePath -> StateT Atoms m () Source
installCabalExec :: Monad m => BinPkgName -> String -> FilePath -> StateT Atoms m () Source
installCabalExecTo :: Monad m => BinPkgName -> String -> FilePath -> StateT Atoms m () Source
installDir :: Monad m => BinPkgName -> FilePath -> StateT Atoms m () Source
installInit :: Lens Atoms (Map BinPkgName Text) Source
Create an etcinit.d file in the package FIXME: change signature to BinPkgName -> Lens Atoms Text