diff options
author | Clint Adams <clint@debian.org> | 2012-11-17 22:38:19 +0400 |
---|---|---|
committer | Clint Adams <clint@debian.org> | 2012-11-17 22:38:19 +0400 |
commit | 8542830d1b79af39c153705d48d7a79955b26ea5 (patch) | |
tree | 94ca626f1ef58b080c993ac4d2217870216e77e6 /p/haskell-optparse-applicative/debian | |
parent | 204e321d38e293aa704d03b43b4a26634fe85cec (diff) | |
download | DHG_packages-8542830d1b79af39c153705d48d7a79955b26ea5.tar.gz |
haskell-optparse-applicative: Initial Check-In
Diffstat (limited to 'p/haskell-optparse-applicative/debian')
-rw-r--r-- | p/haskell-optparse-applicative/debian/changelog | 5 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/compat | 1 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/control | 70 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/copyright | 40 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/patches/series | 1 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/patches/tests-examples.diff | 270 | ||||
-rwxr-xr-x | p/haskell-optparse-applicative/debian/rules | 6 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/source/format | 1 | ||||
-rw-r--r-- | p/haskell-optparse-applicative/debian/watch | 5 |
9 files changed, 399 insertions, 0 deletions
diff --git a/p/haskell-optparse-applicative/debian/changelog b/p/haskell-optparse-applicative/debian/changelog new file mode 100644 index 000000000..5f51a39c5 --- /dev/null +++ b/p/haskell-optparse-applicative/debian/changelog @@ -0,0 +1,5 @@ +haskell-optparse-applicative (0.4.1-1) experimental; urgency=low + + * Initial release. + + -- Clint Adams <clint@debian.org> Sat, 17 Nov 2012 13:10:34 -0500 diff --git a/p/haskell-optparse-applicative/debian/compat b/p/haskell-optparse-applicative/debian/compat new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/p/haskell-optparse-applicative/debian/compat @@ -0,0 +1 @@ +7 diff --git a/p/haskell-optparse-applicative/debian/control b/p/haskell-optparse-applicative/debian/control new file mode 100644 index 000000000..1ae282eac --- /dev/null +++ b/p/haskell-optparse-applicative/debian/control @@ -0,0 +1,70 @@ +Source: haskell-optparse-applicative +Section: haskell +Priority: extra +Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org> +Uploaders: Clint Adams <clint@debian.org> +Build-Depends: debhelper (>= 7) + , cdbs + , haskell-devscripts (>= 0.8.13) + , ghc + , ghc-prof + , libghc-transformers-dev (>> 0.2) + , libghc-transformers-dev (<< 0.4) + , libghc-transformers-prof + , libghc-hunit-dev (>> 1.2) + , libghc-hunit-dev (<< 1.3) + , libghc-test-framework-dev (>> 0.6) + , libghc-test-framework-dev (<< 0.7) + , libghc-test-framework-hunit-dev (>> 0.2) + , libghc-test-framework-hunit-dev (<< 0.3) + , libghc-test-framework-th-prime-dev (>> 0.0) + , libghc-test-framework-th-prime-dev (<< 0.1) +Build-Depends-Indep: ghc-doc + , libghc-transformers-doc +Standards-Version: 3.9.4 +Homepage: http://hackage.haskell.org/package/optparse-applicative +Vcs-Darcs: http://darcs.debian.org/pkg-haskell/haskell-optparse-applicative +Vcs-Browser: http://darcs.debian.org/cgi-bin/darcsweb.cgi?r=pkg-haskell/haskell-optparse-applicative + +Package: libghc-optparse-applicative-dev +Architecture: any +Depends: ${haskell:Depends} + , ${shlibs:Depends} + , ${misc:Depends} +Recommends: ${haskell:Recommends} +Suggests: ${haskell:Suggests} +Provides: ${haskell:Provides} +Description: utilities and combinators for parsing command-line options + This is a library for constructing command-line option parsers in the + applicative style. + . + This package provides a library for the Haskell programming language. + See http://www.haskell.org/ for more information on Haskell. + +Package: libghc-optparse-applicative-prof +Architecture: any +Depends: ${haskell:Depends} + , ${misc:Depends} +Recommends: ${haskell:Recommends} +Suggests: ${haskell:Suggests} +Provides: ${haskell:Provides} +Description: utilities and combinators for parsing command-line options; profiling libs + This is a library for constructing command-line option parsers in the + applicative style. + . + This package provides a library for the Haskell programming language, compiled + for profiling. See http://www.haskell.org/ for more information on Haskell. + +Package: libghc-optparse-applicative-doc +Section: doc +Architecture: all +Depends: ${misc:Depends}, ${haskell:Depends} +Recommends: ${haskell:Recommends} +Suggests: ${haskell:Suggests} +Description: utilities and combinators for parsing command-line options; documentation + This is a library for constructing command-line option parsers in the + applicative style. + . + This package provides the documentation for a library for the Haskell + programming language. + See http://www.haskell.org/ for more information on Haskell. diff --git a/p/haskell-optparse-applicative/debian/copyright b/p/haskell-optparse-applicative/debian/copyright new file mode 100644 index 000000000..36281184b --- /dev/null +++ b/p/haskell-optparse-applicative/debian/copyright @@ -0,0 +1,40 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: optparse-applicative +Upstream-Contact: Paolo Capriotti <p.capriotti@gmail.com> +Source: http://hackage.haskell.org/package/optparse-applicative + +Files: * +Copyright: 2012 Paolo Capriotti +License: BSD3 + +Files: debian/* +Copyright: 2012 Clint Adams +License: ISC + +License: BSD3 + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + . + * Neither the name of Paolo Capriotti nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/p/haskell-optparse-applicative/debian/patches/series b/p/haskell-optparse-applicative/debian/patches/series new file mode 100644 index 000000000..4634a3971 --- /dev/null +++ b/p/haskell-optparse-applicative/debian/patches/series @@ -0,0 +1 @@ +tests-examples.diff diff --git a/p/haskell-optparse-applicative/debian/patches/tests-examples.diff b/p/haskell-optparse-applicative/debian/patches/tests-examples.diff new file mode 100644 index 000000000..3b0459f2d --- /dev/null +++ b/p/haskell-optparse-applicative/debian/patches/tests-examples.diff @@ -0,0 +1,270 @@ +Index: optparse-applicative-0.4.1/tests/Examples/Alternatives.hs +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/Examples/Alternatives.hs 2012-11-17 18:24:59.173793442 +0000 +@@ -0,0 +1,18 @@ ++module Examples.Alternatives where ++ ++import Options.Applicative ++ ++data Value = A | B ++ deriving (Eq, Show) ++ ++values :: Parser [Value] ++values = many $ a <|> b ++ ++a :: Parser Value ++a = flag' A (short 'a') ++ ++b :: Parser Value ++b = flag' B (short 'b') ++ ++opts :: ParserInfo [Value] ++opts = info values idm +Index: optparse-applicative-0.4.1/tests/Examples/Cabal.hs +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/Examples/Cabal.hs 2012-11-17 18:25:10.345787777 +0000 +@@ -0,0 +1,116 @@ ++{-# LANGUAGE Arrows #-} ++module Examples.Cabal where ++ ++import Options.Applicative ++import Options.Applicative.Arrows ++ ++data Args = Args CommonOpts Command ++ deriving Show ++ ++data CommonOpts = CommonOpts ++ { optVerbosity :: Int } ++ deriving Show ++ ++data Command ++ = Install ConfigureOpts InstallOpts ++ | Update ++ | Configure ConfigureOpts ++ | Build BuildOpts ++ deriving Show ++ ++data InstallOpts = InstallOpts ++ { instReinstall :: Bool ++ , instForce :: Bool } ++ deriving Show ++ ++data ConfigureOpts = ConfigureOpts ++ { configTests :: Bool ++ , configFlags :: [String] } ++ deriving Show ++ ++data BuildOpts = BuildOpts ++ { buildDir :: FilePath } ++ deriving Show ++ ++parser :: Parser Args ++parser = runA $ proc () -> do ++ opts <- asA commonOpts -< () ++ cmds <- (asA . subparser) ++ ( command "install" ++ (info installParser ++ (progDesc "Installs a list of packages")) ++ & command "update" ++ (info updateParser ++ (progDesc "Updates list of known packages")) ++ & command "configure" ++ (info configureParser ++ (progDesc "Prepare to build the package")) ++ & command "build" ++ (info buildParser ++ (progDesc "Make this package ready for installation")) ) -< () ++ A helper -< Args opts cmds ++ ++commonOpts :: Parser CommonOpts ++commonOpts = CommonOpts ++ <$> option ++ ( short 'v' ++ & long "verbose" ++ & metavar "LEVEL" ++ & help "Set verbosity to LEVEL" ++ & value 0 ) ++ ++installParser :: Parser Command ++installParser = runA $ proc () -> do ++ config <- asA configureOpts -< () ++ inst <- asA installOpts -< () ++ A helper -< Install config inst ++ ++installOpts :: Parser InstallOpts ++installOpts = runA $ proc () -> do ++ reinst <- asA (switch (long "reinstall")) -< () ++ force <- asA (switch (long "force-reinstall")) -< () ++ returnA -< InstallOpts ++ { instReinstall = reinst ++ , instForce = force } ++ ++updateParser :: Parser Command ++updateParser = runA $ proc () -> ++ A helper -< Update ++ ++configureParser :: Parser Command ++configureParser = runA $ proc () -> do ++ config <- asA configureOpts -< () ++ A helper -< Configure config ++ ++configureOpts :: Parser ConfigureOpts ++configureOpts = runA $ proc () -> do ++ tests <- (asA . switch) ++ ( long "enable-tests" ++ & help "Enable compilation of test suites" ) -< () ++ flags <- (asA . many . strOption) ++ ( short 'f' ++ & long "flags" ++ & metavar "FLAGS" ++ & help "Enable the given flag" ) -< () ++ returnA -< ConfigureOpts tests flags ++ ++buildParser :: Parser Command ++buildParser = runA $ proc () -> do ++ opts <- asA buildOpts -< () ++ A helper -< Build opts ++ ++buildOpts :: Parser BuildOpts ++buildOpts = runA $ proc () -> do ++ bdir <- (asA . strOption) ++ ( long "builddir" ++ & metavar "DIR" ++ & value "dist" ) -< () ++ returnA -< BuildOpts bdir ++ ++pinfo :: ParserInfo Args ++pinfo = info parser idm ++ ++main :: IO () ++main = do ++ r <- execParser pinfo ++ print r +Index: optparse-applicative-0.4.1/tests/Examples/Commands.hs +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/Examples/Commands.hs 2012-11-17 18:25:21.445782141 +0000 +@@ -0,0 +1,32 @@ ++module Examples.Commands where ++ ++import Data.List ++import Options.Applicative ++ ++data Sample ++ = Hello [String] ++ | Goodbye ++ deriving Show ++ ++hello :: Parser Sample ++hello = Hello <$> arguments str (metavar "TARGET...") ++ ++sample :: Parser Sample ++sample = subparser ++ ( command "hello" ++ (info hello ++ (progDesc "Print greeting")) ++ & command "goodbye" ++ (info (pure Goodbye) ++ (progDesc "Say goodbye")) ++ ) ++ ++run :: Sample -> IO () ++run (Hello targets) = putStrLn $ "Hello, " ++ intercalate ", " targets ++ "!" ++run Goodbye = putStrLn "Goodbye." ++ ++opts :: ParserInfo Sample ++opts = info sample idm ++ ++main :: IO () ++main = execParser opts >>= run +Index: optparse-applicative-0.4.1/tests/Examples/Hello.hs +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/Examples/Hello.hs 2012-11-17 18:25:31.689776931 +0000 +@@ -0,0 +1,31 @@ ++module Examples.Hello where ++ ++import Options.Applicative ++ ++data Sample = Sample ++ { hello :: String ++ , quiet :: Bool } ++ deriving Show ++ ++sample :: Parser Sample ++sample = Sample ++ <$> strOption ++ ( long "hello" ++ & metavar "TARGET" ++ & help "Target for the greeting" ) ++ <*> switch ++ ( long "quiet" ++ & help "Whether to be quiet" ) ++ ++greet :: Sample -> IO () ++greet (Sample h False) = putStrLn $ "Hello, " ++ h ++greet _ = return () ++ ++main :: IO () ++main = execParser opts >>= greet ++ ++opts :: ParserInfo Sample ++opts = info (sample <**> helper) ++ ( fullDesc ++ & progDesc "Print a greeting for TARGET" ++ & header "hello - a test for optparse-applicative" ) +Index: optparse-applicative-0.4.1/tests/alt.err.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/alt.err.txt 2012-11-17 18:32:22.725494500 +0000 +@@ -0,0 +1,6 @@ ++Usage: alt (--virtual-machine VM | --cloud-service CS | --dry-run) ++ ++Available options: ++ --virtual-machine VM Virtual machine name ++ --cloud-service CS Cloud service name ++ -h,--help Show this help text +Index: optparse-applicative-0.4.1/tests/cabal.err.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/cabal.err.txt 2012-11-17 18:32:33.225486762 +0000 +@@ -0,0 +1,7 @@ ++Usage: cabal configure [--enable-tests] [-f|--flags FLAGS] ++ Prepare to build the package ++ ++Available options: ++ --enable-tests Enable compilation of test suites ++ -f,--flags FLAGS Enable the given flag ++ -h,--help Show this help text +Index: optparse-applicative-0.4.1/tests/commands.err.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/commands.err.txt 2012-11-17 18:32:46.337477097 +0000 +@@ -0,0 +1,5 @@ ++Usage: commands COMMAND ++ ++Available commands: ++ hello Print greeting ++ goodbye Say goodbye +Index: optparse-applicative-0.4.1/tests/hello.err.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/hello.err.txt 2012-11-17 18:32:55.161470593 +0000 +@@ -0,0 +1,9 @@ ++hello - a test for optparse-applicative ++ ++Usage: hello --hello TARGET [--quiet] ++ Print a greeting for TARGET ++ ++Available options: ++ --hello TARGET Target for the greeting ++ --quiet Whether to be quiet ++ -h,--help Show this help text +Index: optparse-applicative-0.4.1/tests/nested.err.txt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ optparse-applicative-0.4.1/tests/nested.err.txt 2012-11-17 18:33:14.957455997 +0000 +@@ -0,0 +1 @@ ++Usage: nested c b -a A diff --git a/p/haskell-optparse-applicative/debian/rules b/p/haskell-optparse-applicative/debian/rules new file mode 100755 index 000000000..01f1aaf04 --- /dev/null +++ b/p/haskell-optparse-applicative/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +DEB_ENABLE_TESTS = yes + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/hlibrary.mk diff --git a/p/haskell-optparse-applicative/debian/source/format b/p/haskell-optparse-applicative/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/p/haskell-optparse-applicative/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/p/haskell-optparse-applicative/debian/watch b/p/haskell-optparse-applicative/debian/watch new file mode 100644 index 000000000..8dbfe5bf3 --- /dev/null +++ b/p/haskell-optparse-applicative/debian/watch @@ -0,0 +1,5 @@ +version=3 +opts="downloadurlmangle=s|archive/([\w\d_-]+)/([\d\.]+)/|archive/$1/$2/$1-$2.tar.gz|,\ +filenamemangle=s|(.*)/$|optparse-applicative-$1.tar.gz|" \ + http://hackage.haskell.org/packages/archive/optparse-applicative \ + ([\d\.]*\d)/ |