Safe Haskell | None |
---|---|
Language | Haskell2010 |
Code pulled out of cabal-debian that straightforwardly implements parts of the Debian policy manual, or other bits of Linux standards.
- databaseDirectory :: BinPkgName -> String
- dataDirectory :: PackageDescription -> String
- apacheLogDirectory :: BinPkgName -> String
- apacheErrorLog :: BinPkgName -> String
- apacheAccessLog :: BinPkgName -> String
- serverLogDirectory :: BinPkgName -> String
- serverAppLog :: BinPkgName -> String
- serverAccessLog :: BinPkgName -> String
- errorLogBaseName :: String
- appLogBaseName :: String
- accessLogBaseName :: String
- debianPackageVersion :: String -> IO (Maybe DebianVersion)
- getDebhelperCompatLevel :: IO (Maybe Int)
- data StandardsVersion = StandardsVersion Int Int Int (Maybe Int)
- getDebianStandardsVersion :: IO (Maybe StandardsVersion)
- parseStandardsVersion :: String -> StandardsVersion
- data SourceFormat
- readSourceFormat :: Text -> Either Text SourceFormat
- data PackagePriority
- readPriority :: String -> PackagePriority
- data PackageArchitectures
- parsePackageArchitectures :: String -> PackageArchitectures
- data Section
- readSection :: String -> Section
- data MultiArch
- readMultiArch :: String -> MultiArch
- data Area
- parseUploaders :: String -> Either String [NameAddr]
- parseMaintainer :: String -> Either String NameAddr
- maintainerOfLastResort :: NameAddr
- getCurrentDebianUser :: IO (Maybe NameAddr)
- haskellMaintainer :: NameAddr
- data License
- = Public_Domain
- | Apache
- | Artistic
- | BSD_2_Clause
- | BSD_3_Clause
- | BSD_4_Clause
- | ISC
- | CC_BY
- | CC_BY_SA
- | CC_BY_ND
- | CC_BY_NC
- | CC_BY_NC_SA
- | CC_BY_NC_ND
- | CC0
- | CDDL
- | CPL
- | EFL
- | Expat
- | GPL
- | LGPL
- | GFDL
- | GFDL_NIV
- | LPPL
- | MPL
- | Perl
- | Python
- | QPL
- | W3C
- | Zlib
- | Zope
- | OtherLicense String
- fromCabalLicense :: License -> License
- toCabalLicense :: License -> License
- readLicense :: Text -> License
Paths
databaseDirectory :: BinPkgName -> String Source #
apacheErrorLog :: BinPkgName -> String Source #
apacheAccessLog :: BinPkgName -> String Source #
serverAppLog :: BinPkgName -> String Source #
serverAccessLog :: BinPkgName -> String Source #
Installed packages
debianPackageVersion :: String -> IO (Maybe DebianVersion) Source #
getDebhelperCompatLevel :: IO (Maybe Int) Source #
The version number of the installed debhelper package is the highest acceptable value for compat in a debian/control file. If the package doesn't explicitly set an (acceptable) compat value we can use the value returned by this function, assuming debhelper is installed.
data StandardsVersion Source #
getDebianStandardsVersion :: IO (Maybe StandardsVersion) Source #
Assumes debian-policy is installed
Package fields
data SourceFormat Source #
data PackagePriority Source #
readPriority :: String -> PackagePriority Source #
data PackageArchitectures Source #
The architectures for which a binary deb can be built.
readSection :: String -> Section Source #
readMultiArch :: String -> MultiArch Source #
parseUploaders :: String -> Either String [NameAddr] Source #
Turn the uploaders field of a cabal package into a list of RFC2822 NameAddr values.
parseMaintainer :: String -> Either String NameAddr Source #
Parse a string containing a single NameAddr value.
maintainerOfLastResort :: NameAddr Source #
Maintainer is a mandatory field, so we need a value we can use when all else fails.
Official Debian license types as described in https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-specification.
Public_Domain | No license required for any purpose; the work is not subject to copyright in any jurisdiction. |
Apache | Apache license 1.0, 2.0. |
Artistic | Artistic license 1.0, 2.0. |
BSD_2_Clause | Berkeley software distribution license, 2-clause version. |
BSD_3_Clause | Berkeley software distribution license, 3-clause version. |
BSD_4_Clause | Berkeley software distribution license, 4-clause version. |
ISC | Internet Software Consortium, sometimes also known as the OpenBSD License. |
CC_BY | Creative Commons Attribution license 1.0, 2.0, 2.5, 3.0. |
CC_BY_SA | Creative Commons Attribution Share Alike license 1.0, 2.0, 2.5, 3.0. |
CC_BY_ND | Creative Commons Attribution No Derivatives license 1.0, 2.0, 2.5, 3.0. |
CC_BY_NC | Creative Commons Attribution Non-Commercial license 1.0, 2.0, 2.5, 3.0. |
CC_BY_NC_SA | Creative Commons Attribution Non-Commercial Share Alike license 1.0, 2.0, 2.5, 3.0. |
CC_BY_NC_ND | Creative Commons Attribution Non-Commercial No Derivatives license 1.0, 2.0, 2.5, 3.0. |
CC0 | Creative Commons Zero 1.0 Universal. Omit Universal from the license version when forming the short name. |
CDDL | Common Development and Distribution License 1.0. |
CPL | IBM Common Public License. |
EFL | The Eiffel Forum License 1.0, 2.0. |
Expat | The Expat license. |
GPL | GNU General Public License 1.0, 2.0, 3.0. |
LGPL | GNU Lesser General Public License 2.1, 3.0, or GNU Library General Public License 2.0. |
GFDL | GNU Free Documentation License 1.0, 1.1, 1.2, or 1.3. Use GFDL-NIV instead if there are no Front-Cover or Back-Cover Texts or Invariant Sections. |
GFDL_NIV | GNU Free Documentation License, with no Front-Cover or Back-Cover Texts or Invariant Sections. Use the same version numbers as GFDL. |
LPPL | LaTeX Project Public License 1.0, 1.1, 1.2, 1.3c. |
MPL | Mozilla Public License 1.1. |
Perl | erl license (use "GPL-1+ or Artistic-1" instead) |
Python | Python license 2.0. |
QPL | Q Public License 1.0. |
W3C | W3C Software License For more information, consult the W3C Intellectual Rights FAQ. |
Zlib | zlib/libpng license. |
Zope | Zope Public License 1.0, 1.1, 2.0, 2.1. |
OtherLicense String | Any other license name |
fromCabalLicense :: License -> License Source #
Convert the Cabal license to a Debian license. I would welcome input on how to make this more correct.
toCabalLicense :: License -> License Source #
Convert a Debian license to a Cabal license. Additional cases and corrections welcome.
readLicense :: Text -> License Source #
I think we need an actual parser for license names.