archlinux-0.2.2: Support for working with Arch Linux packagesSource codeContentsIndex
Distribution.ArchLinux.PkgBuild
MaintainerDon Stewart <dons@galois.com>
Description
Synopsis
data PkgBuild = PkgBuild {
arch_pkgname :: String
arch_pkgver :: Version
arch_pkgrel :: !Int
arch_pkgdesc :: String
arch_arch :: ArchList ArchArch
arch_url :: String
arch_license :: ArchList License
arch_makedepends :: ArchList ArchDep
arch_depends :: ArchList ArchDep
arch_source :: ArchList String
arch_md5sum :: ArchList String
arch_build :: [String]
arch_install :: Maybe String
arch_options :: ArchList ArchOptions
}
data ArchOptions = Strip
emptyPkgBuild :: PkgBuild
newtype ArchDep = ArchDep Dependency
data ArchArch
= Arch_X86
| Arch_X86_64
newtype ArchList a = ArchList [a]
dispNoQuotes :: Text a => ArchList a -> Doc
data AnnotatedPkgBuild = AnnotatedPkgBuild {
pkgBuiltWith :: Maybe Version
pkgHeader :: String
pkgBody :: PkgBuild
}
emptyPkg :: AnnotatedPkgBuild
type ResultP a = Either String a
decodePackage :: String -> ResultP AnnotatedPkgBuild
newtype GetPKG a = GetPKG {
un :: String -> Either String (a, String)
}
runGetPKG :: GetPKG a -> String -> ResultP a
getInput :: GetPKG String
setInput :: String -> GetPKG ()
(<$>) :: Functor f => (a -> b) -> f a -> f b
readPackage :: AnnotatedPkgBuild -> GetPKG AnnotatedPkgBuild
type Warnings = String
recentCabal2ArchVersion :: Maybe Version
oldCabal2Arch :: AnnotatedPkgBuild -> Bool
Documentation
data PkgBuild Source
A data type to represent PKGBUILD files
Constructors
PkgBuild
arch_pkgname :: StringThe name of the package. This has be a unix-friendly name as it will be used in the package filename.
arch_pkgver :: VersionThe version of the software as released from the authorii (e.g. 2.7.1).
arch_pkgrel :: !IntThis 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_pkgdesc :: StringThis should be a brief description of the package and its functionality. Try to keep the description to one line of text.
arch_arch :: ArchList ArchArchDefines on which architectures the given package is available (e.g. arch=(i686 x86_64)).
arch_url :: StringThis field contains a URL that is associated with the software being packaged. This is typically the projects website.
arch_license :: ArchList LicenseThis 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_makedepends :: ArchList ArchDepAn 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_depends :: ArchList ArchDepAn 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_source :: ArchList StringAn 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_md5sum :: ArchList StringThis 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_build :: [String]The build hook
arch_install :: Maybe StringSpecifies 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_options :: ArchList ArchOptionsThis 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.
show/hide Instances
data ArchOptions Source
Constructors
Strip
show/hide Instances
emptyPkgBuild :: PkgBuildSource
An empty PKGBUILD
newtype ArchDep Source
Constructors
ArchDep Dependency
show/hide Instances
data ArchArch Source
Valid linux platforms
Constructors
Arch_X86
Arch_X86_64
show/hide Instances
newtype ArchList a Source
Constructors
ArchList [a]
show/hide Instances
dispNoQuotes :: Text a => ArchList a -> DocSource
Printing with no quotes
data AnnotatedPkgBuild Source
A PKGBUILD data structure with additional metadata
Constructors
AnnotatedPkgBuildcontents of pkgbuild file
pkgBuiltWith :: Maybe Versionversion of cabal2arch used, if any
pkgHeader :: Stringheader strings
pkgBody :: PkgBuild
show/hide Instances
emptyPkg :: AnnotatedPkgBuildSource
Empty state structure
type ResultP a = Either String aSource
Result type for pkgbuild parsers
decodePackage :: String -> ResultP AnnotatedPkgBuildSource
newtype GetPKG a Source
The type of pkgbuild parsers for String
Constructors
GetPKG
un :: String -> Either String (a, String)
show/hide Instances
runGetPKG :: GetPKG a -> String -> ResultP aSource
Run a PKG reader on an input String, returning a PKGBUILD
getInput :: GetPKG StringSource
setInput :: String -> GetPKG ()Source
(<$>) :: Functor f => (a -> b) -> f a -> f bSource
readPackage :: AnnotatedPkgBuild -> GetPKG AnnotatedPkgBuildSource
Recursively parse the pkgbuild
type Warnings = StringSource
recentCabal2ArchVersion :: Maybe VersionSource
oldCabal2Arch :: AnnotatedPkgBuild -> BoolSource
Look for problems in the PKGBUILD
Produced by Haddock version 2.6.0