-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Support for working with Arch Linux packages.
--
-- Support for working with Arch Linux packages. See also the cabal2arch
-- tool http://hackage.haskell.org/package/cabal2arch for
-- conversion between Hackage and AUR.
@package archlinux
@version 1.1
module Distribution.ArchLinux.SystemProvides
data SystemProvides
SystemProvides :: [Dependency] -> [Dependency] -> Map String String -> SystemProvides
-- | A list of Dependencies which are automatically satified when GHC is
-- installed.
corePackages :: SystemProvides -> [Dependency]
-- | A list of packages to preferably use (e.g. Haskell Platform)
platformPackages :: SystemProvides -> [Dependency]
-- | A hash-map where keys are library names and values are names of the
-- corresponding ArchLinux package.
translationTable :: SystemProvides -> Map String String
emptySystemProvides :: SystemProvides
parseSystemProvides :: String -> String -> String -> SystemProvides
instance Show SystemProvides
instance Eq SystemProvides
module Distribution.ArchLinux.PkgBuild
-- | A data type to represent PKGBUILD files
data PkgBuild
PkgBuild :: String -> Version -> !Int -> String -> ArchList ArchArch -> String -> ArchList License -> ArchList ArchDep -> ArchList ArchDep -> ArchList String -> ArchList String -> [String] -> [String] -> Maybe String -> ArchList ArchOptions -> PkgBuild
-- | The name of the package. This has be a unix-friendly name as it will
-- be used in the package filename.
arch_pkgname :: PkgBuild -> String
-- | The version of the software as released from the authorii (e.g.
-- 2.7.1).
arch_pkgver :: PkgBuild -> Version
-- | This is the release number specific to the Arch Linux release. This
-- allows package maintainers to make updates to the packages configure
-- flags, for example. A pkgrel of 1 is typically used for each upstream
-- software release and is incremented for intermediate PKGBUILD updates.
arch_pkgrel :: PkgBuild -> !Int
-- | This should be a brief description of the package and its
-- functionality. Try to keep the description to one line of text.
arch_pkgdesc :: PkgBuild -> String
-- | Defines on which architectures the given package is available (e.g.
-- arch=(i686 x86_64)).
arch_arch :: PkgBuild -> ArchList ArchArch
-- | This field contains a URL that is associated with the software being
-- packaged. This is typically the projects website.
arch_url :: PkgBuild -> String
-- | This field specifies the license(s) that apply to the package.
-- Commonly-used licenses are found in
-- usrsharelicensescommon. If you see the packages license
-- there, simply reference it in the license field (e.g.
-- license=(GPL)). If the package provides a license not found in
-- usrsharelicensescommon, then you should include the
-- license in the package itself and set license=(custom) or
-- license=(custom:LicenseName). The license should be placed in
-- $pkgdirusrsharelicenses$pkgname when building the
-- package. If multiple licenses are applicable for a package, list all
-- of them: license=(GPL FDL).
arch_license :: PkgBuild -> ArchList License
-- | An array of packages that this package depends on to build, but are
-- not needed at runtime. Packages in this list follow the same format as
-- depends.
arch_makedepends :: PkgBuild -> ArchList ArchDep
-- | An array of packages that this package depends on to run. Packages in
-- this list should be surrounded with single quotes and contain at least
-- the package name. Entries can also include a version requirement of
-- the form nameversion, where is one of five comparisons:
-- >= (greater than or equal to), <= (less than or equal to), =
-- (equal to), > (greater than), or < (less than).
arch_depends :: PkgBuild -> ArchList ArchDep
-- | An array of source files required to build the package. Source files
-- must either reside in the same directory as the PKGBUILD file, or be a
-- fully-qualified URL that makepkg will use to download the file. In
-- order to make the PKGBUILD as useful as possible, use the $pkgname and
-- $pkgver variables if possible when specifying the download location.
-- Any files that are compressed will automatically be extracted, unless
-- found in the noextract array listed below.
arch_source :: PkgBuild -> ArchList String
-- | This array contains an MD5 hash for every source file specified in the
-- source array (in the same order). makepkg will use this to verify
-- source file integrity during subsequent builds. To easily generate
-- md5sums, run makepkg -g >> PKGBUILD. If desired, move the
-- md5sums line to an appropriate location. NOTE: makepkg supports
-- multiple integrity algorithms and their corresponding arrays (i.e.
-- sha1sums for the SHA1 algorithm); however, official packages use only
-- md5sums for the time being.
arch_md5sum :: PkgBuild -> ArchList String
-- | The build hook
arch_build :: PkgBuild -> [String]
-- | The packaging hook
arch_package :: PkgBuild -> [String]
-- | Specifies a special install script that is to be included in the
-- package. This file should reside in the same directory as the
-- PKGBUILD, and will be copied into the package by makepkg. It does not
-- need to be included in the source array (e.g.
-- install=pkgname.install).
arch_install :: PkgBuild -> Maybe String
-- | This array allows you to override some of makepkgs default behavior
-- when building packages. To set an option, just include the option name
-- in the options array. To reverse the default behavior, place an ! at
-- the front of the option. Only specify the options you specifically
-- want to override, the rest will be taken from makepkg.conf(5). NOTE:
-- force is a special option only used in a PKGBUILD(5), do not use it
-- unless you know what you are doing.
arch_options :: PkgBuild -> ArchList ArchOptions
-- | An empty PKGBUILD
emptyPkgBuild :: PkgBuild
-- | A PKGBUILD data structure with additional metadata
data AnnotatedPkgBuild
-- | contents of pkgbuild file
AnnotatedPkgBuild :: Maybe Version -> String -> String -> PkgBuild -> AnnotatedPkgBuild
-- | version of cabal2arch used, if any
pkgBuiltWith :: AnnotatedPkgBuild -> Maybe Version
-- | header strings
pkgHeader :: AnnotatedPkgBuild -> String
-- | package name on Hackage
hkgName :: AnnotatedPkgBuild -> String
pkgBody :: AnnotatedPkgBuild -> PkgBuild
-- | Empty state structure
emptyPkg :: AnnotatedPkgBuild
newtype ArchList a
ArchList :: [a] -> ArchList a
newtype ArchDep
ArchDep :: Dependency -> ArchDep
-- | Extract just the package name from ArchDep
pkgnameFromArchDep :: ArchDep -> String
decodePackage :: String -> ResultP AnnotatedPkgBuild
pkg2doc :: String -> AnnotatedPkgBuild -> Doc
instance Show ArchOptions
instance Eq ArchOptions
instance Eq ArchDep
instance Show ArchDep
instance Show ArchArch
instance Eq ArchArch
instance Show a => Show (ArchList a)
instance Eq a => Eq (ArchList a)
instance Monoid (ArchList a)
instance Functor ArchList
instance Show PkgBuild
instance Eq PkgBuild
instance Eq AnnotatedPkgBuild
instance Show AnnotatedPkgBuild
instance Text AnnotatedPkgBuild
instance Text PkgBuild
instance Monad GetPKG
instance Functor GetPKG
instance Text a => Text (ArchList a)
instance Text String
instance Text ArchArch
instance Text ArchDep
instance Text ArchOptions
-- | This module makes a database out a directory ${repo} containing
-- subdirs ${repo}/${package} corresponding to packages. It can output
-- rebuild lists in reverse dependency order.
module Distribution.ArchLinux.SrcRepo
-- | Data type for source repositories
data SrcRepo
SrcRepo :: FilePath -> Map String PkgBuild -> SrcRepo
-- | The path to the repository
repo_path :: SrcRepo -> FilePath
repo_contents :: SrcRepo -> Map String PkgBuild
-- | Reads a directory into a package
getPkgFromDir :: FilePath -> IO PkgBuild
-- | Reads a specified path into a SrcRepo structure
getRepoFromDir :: FilePath -> IO (Maybe SrcRepo)
insertpkg :: Map String PkgBuild -> FilePath -> IO (Map String PkgBuild)
-- | Dumps a topologically sorted list of packages starting with an
-- optionally given key
dumpContentsTopo :: SrcRepo -> [String]
archProvidedPkgs :: [String]
-- | Helper function
isExternalDep :: String -> SrcRepo -> Bool
trueDepends :: PkgBuild -> SrcRepo -> [String]
-- | Enumerate all build-time dependencies for a package
strDepends :: PkgBuild -> [String]
-- | Output the recursive dependencies of a package in topological order
getDependencies :: String -> SrcRepo -> [String]
-- | Extract the subrepository of recursive dependencies of a package
getDependencyRepo :: String -> SrcRepo -> SrcRepo
-- | Output reverse dependencies of a list of packages in topological order
getReverseDependencies :: [String] -> SrcRepo -> [String]
-- | Extract reverse dependencies of a list of packages
getReverseDependencyRepo :: [String] -> SrcRepo -> SrcRepo
-- | Find version inconsistencies in a repository
isConflicting :: SrcRepo -> Bool
listVersionConflicts :: SrcRepo -> [String]
-- | Check package dependencies against the repo
isConflictingWith :: PkgBuild -> SrcRepo -> Bool
-- | check for existence of the right version is the repository (return
-- Nothing if package not found)
isSatisfiedBy :: ArchDep -> SrcRepo -> Maybe Bool
instance Show SrcRepo
module Distribution.ArchLinux.CabalTranslation
-- | Configure package for system
preprocessCabal :: GenericPackageDescription -> SystemProvides -> Maybe PackageDescription
-- | Translate a generic cabal file into a PKGBUILD (using default values
-- for pkgname and pkgrel).
cabal2pkg :: PackageDescription -> SystemProvides -> (AnnotatedPkgBuild, Maybe String)
-- | Translate a generic cabal file into a PKGBUILD, using the specified
-- ArchLinux package name and package release.
cabal2pkg' :: PackageDescription -> String -> Int -> SystemProvides -> (AnnotatedPkgBuild, Maybe String)
-- | Look for problems in the PKGBUILD
oldCabal2Arch :: AnnotatedPkgBuild -> Bool
install_hook_name :: String -> String
module Distribution.ArchLinux.HackageTranslation
-- | Check for inconsistencies in version requirements returns a list of
-- pairs (package, conflicting dep).
getVersionConflicts :: [GenericPackageDescription] -> SystemProvides -> [(PackageDescription, Dependency)]
-- | Returns the latest versions
getLatestVersions :: [GenericPackageDescription] -> Map PackageName Version