module Debian.Debianize.Types
(
verbosity
, dryRun
, debAction
, cabalFlagAssignments
, packageDescription
, execMap
, epochMap
, missingDependencies
, extraLibMap
, debianNameMap
, sourcePackageName
, overrideDebianNameBase
, revision
, debVersion
, debianMaintainer
, debianUploaders
, maintainerOption
, uploadersOption
, copyright
, sourceArchitectures
, sourcePriority
, sourceSection
, compat
, sourceFormat
, changelog
, comments
, standardsVersion
, rulesHead
, rulesSettings
, rulesIncludes
, rulesFragments
, official
, noProfilingLibrary
, noDocumentationLibrary
, utilsPackageNameBase
, buildDir
, watch
, xDescription
, omitProfVersionDeps
, omitLTDeps
, binaryArchitectures
, executable
, serverInfo
, website
, backups
, apacheSite
, extraDevDeps
, postInst
, postRm
, preInst
, preRm
, binaryPriority
, binarySection
, installInit
, packageType
, debianDescription
, essential
, depends
, recommends
, suggests
, preDepends
, breaks
, conflicts
, provides
, replaces
, builtUsing
, link
, install
, installTo
, installData
, file
, installCabalExec
, installCabalExecTo
, installDir
, logrotateStanza
, flags
, validate
, warning
, intermediateFiles
, packageInfo
, control
, source
, changedBy
, uploaders
, dmUploadAllowed
, homepage
, vcsFields
, xFields
, buildDepends
, buildConflicts
, buildDependsIndep
, buildConflictsIndep
, binaryPackages
) where
import Control.Category ((.))
import Data.Lens.Lazy (Lens, iso, getL)
import Data.Set as Set (Set)
import Data.Text (Text)
import Debian.Debianize.Prelude (maybeLens, listElemLens)
import Debian.Debianize.Types.Atoms
import qualified Debian.Debianize.Types.BinaryDebDescription as B
import qualified Debian.Debianize.Types.SourceDebDescription as S
import Debian.Orphans ()
import Debian.Policy (PackageArchitectures, PackagePriority, Section, StandardsVersion)
import Debian.Relation (BinPkgName, Relations, SrcPkgName)
import Prelude hiding (init, init, log, log, unlines, (.))
import Text.ParserCombinators.Parsec.Rfc2822 (NameAddr)
binaryDebDescription :: BinPkgName -> Lens Atoms B.BinaryDebDescription
binaryDebDescription b = maybeLens (B.newBinaryDebDescription b) (iso id id) . listElemLens ((== b) . getL B.package) . S.binaryPackages . control
packageType :: BinPkgName -> Lens Atoms (Maybe B.PackageType)
packageType b = B.packageType . binaryDebDescription b
debianDescription :: BinPkgName -> Lens Atoms (Maybe Text)
debianDescription b = B.description . binaryDebDescription b
essential :: BinPkgName -> Lens Atoms (Maybe Bool)
essential b = B.essential . binaryDebDescription b
depends :: BinPkgName -> Lens Atoms Relations
depends b = B.depends . B.relations . binaryDebDescription b
recommends :: BinPkgName -> Lens Atoms Relations
recommends b = B.recommends . B.relations . binaryDebDescription b
suggests :: BinPkgName -> Lens Atoms Relations
suggests b = B.suggests . B.relations . binaryDebDescription b
preDepends :: BinPkgName -> Lens Atoms Relations
preDepends b = B.preDepends . B.relations . binaryDebDescription b
breaks :: BinPkgName -> Lens Atoms Relations
breaks b = B.breaks . B.relations . binaryDebDescription b
conflicts :: BinPkgName -> Lens Atoms Relations
conflicts b = B.conflicts . B.relations . binaryDebDescription b
provides :: BinPkgName -> Lens Atoms Relations
provides b = B.provides . B.relations . binaryDebDescription b
replaces :: BinPkgName -> Lens Atoms Relations
replaces b = B.replaces . B.relations . binaryDebDescription b
builtUsing :: BinPkgName -> Lens Atoms Relations
builtUsing b = B.builtUsing . B.relations . binaryDebDescription b
debianMaintainer :: Lens Atoms (Maybe NameAddr)
debianMaintainer = S.maintainer . control
debianUploaders :: Lens Atoms [NameAddr]
debianUploaders = S.uploaders . control
binaryArchitectures :: BinPkgName -> Lens Atoms (Maybe PackageArchitectures)
binaryArchitectures b = B.architecture . binaryDebDescription b
sourcePriority :: Lens Atoms (Maybe PackagePriority)
sourcePriority = S.priority . control
binaryPriority :: BinPkgName -> Lens Atoms (Maybe PackagePriority)
binaryPriority b = B.binaryPriority . binaryDebDescription b
sourceSection :: Lens Atoms (Maybe Section)
sourceSection = S.section . control
binarySection :: BinPkgName -> Lens Atoms (Maybe Section)
binarySection b = B.binarySection . binaryDebDescription b
source :: Lens Atoms (Maybe SrcPkgName)
source = S.source . control
changedBy :: Lens Atoms (Maybe NameAddr)
changedBy = S.changedBy . control
uploaders :: Lens Atoms ([NameAddr])
uploaders = S.uploaders . control
dmUploadAllowed :: Lens Atoms (Bool)
dmUploadAllowed = S.dmUploadAllowed . control
standardsVersion :: Lens Atoms (Maybe StandardsVersion)
standardsVersion = S.standardsVersion . control
homepage :: Lens Atoms (Maybe Text)
homepage = S.homepage . control
vcsFields :: Lens Atoms (Set S.VersionControlSpec)
vcsFields = S.vcsFields . control
xFields :: Lens Atoms (Set S.XField)
xFields = S.xFields . control
buildDepends :: Lens Atoms Relations
buildDepends = S.buildDepends . control
buildDependsIndep :: Lens Atoms Relations
buildDependsIndep = S.buildDependsIndep . control
buildConflicts :: Lens Atoms Relations
buildConflicts = S.buildConflicts . control
buildConflictsIndep :: Lens Atoms Relations
buildConflictsIndep = S.buildConflictsIndep . control
binaryPackages :: Lens Atoms [B.BinaryDebDescription]
binaryPackages = S.binaryPackages . control