-- 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 -- -- To get info about a package: -- --
-- info "xmonad" ---- -- To find packages matching a string: -- --
-- search "xmonad" ---- -- Check status of a list of packages against AUR and Hackage: -- --
-- report ["xmonad"] ---- -- See also the cabal2arch tool -- http://hackage.haskell.org/package/cabal2arch for conversion -- between Hackage and AUR. @package archlinux @version 0.2.1 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] -> 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 name>version, 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] -- | 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 data ArchOptions Strip :: ArchOptions -- | An empty PKGBUILD emptyPkgBuild :: PkgBuild newtype ArchDep ArchDep :: Dependency -> ArchDep -- | Valid linux platforms data ArchArch Arch_X86 :: ArchArch Arch_X86_64 :: ArchArch newtype ArchList a ArchList :: [a] -> ArchList a -- | Printing with no quotes dispNoQuotes :: (Text a) => ArchList a -> Doc -- | A PKGBUILD data structure with additional metadata data AnnotatedPkgBuild -- | contents of pkgbuild file AnnotatedPkgBuild :: Maybe Version -> String -> PkgBuild -> AnnotatedPkgBuild -- | version of cabal2arch used, if any pkgBuiltWith :: AnnotatedPkgBuild -> Maybe Version -- | header strings pkgHeader :: AnnotatedPkgBuild -> String pkgBody :: AnnotatedPkgBuild -> PkgBuild -- | Empty state structure emptyPkg :: AnnotatedPkgBuild -- | Result type for pkgbuild parsers type ResultP a = Either String a decodePackage :: String -> ResultP AnnotatedPkgBuild -- | The type of pkgbuild parsers for String newtype GetPKG a GetPKG :: (String -> Either String (a, String)) -> GetPKG a un :: GetPKG a -> String -> Either String (a, String) -- | Run a PKG reader on an input String, returning a PKGBUILD runGetPKG :: GetPKG a -> String -> ResultP a getInput :: GetPKG String setInput :: String -> GetPKG () (<$>) :: (Functor f) => (a -> b) -> f a -> f b -- | Recursively parse the pkgbuild readPackage :: AnnotatedPkgBuild -> GetPKG AnnotatedPkgBuild type Warnings = String recentCabal2ArchVersion :: Maybe Version -- | Look for problems in the PKGBUILD oldCabal2Arch :: AnnotatedPkgBuild -> Bool instance Eq AnnotatedPkgBuild instance Show AnnotatedPkgBuild instance (Show a) => Show (ArchList a) instance (Eq a) => Eq (ArchList a) instance Monoid (ArchList a) instance Functor ArchList instance Show ArchArch instance Eq ArchArch instance Eq ArchDep instance Show ArchDep instance Show ArchOptions instance Eq ArchOptions instance Show PkgBuild instance Eq 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 -- | Support for querying the AUR database. module Distribution.ArchLinux.AUR -- | Type for AUR RPC responses. data AURInfo AURInfo :: Integer -> String -> String -> Either String (Version, String) -> Integer -> String -> Integer -> String -> FilePath -> String -> Integer -> Bool -> AURInfo -- | unique ID of the package on AUR packageID :: AURInfo -> Integer -- | url of AUR package packageURLinAUR :: AURInfo -> String -- | string name of package packageName :: AURInfo -> String -- | either the AUR version (version,rev) or a string packageVersion :: AURInfo -> Either String (Version, String) -- | numeric category of the package (e.g. 17 == System) packageCategory :: AURInfo -> Integer -- | package synopsis packageDesc :: AURInfo -> String -- | which repository is it stored in (community, AUR etc) packageLocation :: AURInfo -> Integer -- | url (sanity check: should be hackage url mostly) packageURL :: AURInfo -> String -- | url path to package source. packagePath :: AURInfo -> FilePath -- | type of license packageLicense :: AURInfo -> String -- | votes on package packageVotes :: AURInfo -> Integer -- | is the package flagged as out of date packageOutOfDate :: AURInfo -> Bool -- | Query AUR for information on a package -- --
-- $ info "xmonad"
--
-- Right (AURInfo { packageID = 10593
-- , packageName = "xmonad"
-- , packageVersion = Right (Version {versionBranch = [0,8,1] , versionTags = []},"1.2")i
-- , packageCategory = 17
-- , packageDesc = "A lightweight X11 tiled window manager written in Haskell"
-- , packageLocation = 3
-- , packageURL = "http://xmonad.org/"
-- , packagePath = "/packages/xmonad/xmonad.tar.gz"
-- , packageLicense = "custom:BSD3"
-- , packageVotes = 260
-- , packageOutOfDate = False })
--
info :: String -> IO (Either String AURInfo)
-- | Search AUR for packages matching pattern. Returns a list of info
-- results.
search :: String -> IO [AURInfo]
-- | Return the parsed PKGBUILD pkgbuild :: String -> IO (Either String
-- [String]) -- (Either String PkgBuild)
package :: String -> IO (Either String AURInfo, Either String AnnotatedPkgBuild)
instance Show AURInfo
instance Show Name
instance Show AURRequest
instance JSON AURSearch
instance JSON AURInfo
instance Pretty Name
instance Pretty AURRequest
-- | Construct reports about a set of packages in AUR
module Distribution.ArchLinux.Report
-- | Take as input a list of package names, return a pandoc object
-- reporting on interesting facts about the packages.
report :: [String] -> IO String
myReadProcess :: FilePath -> [String] -> String -> IO (Either (ExitCode, String, String) String)
instance NFData AnnotatedPkgBuild
instance NFData AURInfo
instance NFData Version
instance NFData (IO a)