Name:                   dns
Version:                2.0.1
Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
License:                BSD3
License-File:           LICENSE
Synopsis:               DNS library in Haskell
Description:
  A thread-safe DNS library for both clients and servers written
  in pure Haskell.
Category:               Network
Cabal-Version:          >= 1.10
Build-Type:             Simple
Extra-Source-Files:     Changelog

Library
  Default-Language:     Haskell2010
  GHC-Options:          -Wall
  Exposed-Modules:      Network.DNS
                        Network.DNS.Lookup
                        Network.DNS.Resolver
                        Network.DNS.Utils
                        Network.DNS.Types
                        Network.DNS.Encode
                        Network.DNS.Decode
  Other-Modules:        Network.DNS.Internal
                        Network.DNS.StateBinary
  if impl(ghc >= 7)
    Build-Depends:      base >= 4 && < 5
                      , attoparsec
                      , binary
                      , blaze-builder
                      , bytestring
                      , conduit >= 1.1
                      , conduit-extra >= 1.1
                      , containers
                      , iproute >= 1.3.2
                      , mtl
                      , network >= 2.3
                      , random
                      , resourcet
  else
    Build-Depends:      base >= 4 && < 5
                      , attoparsec
                      , binary
                      , blaze-builder
                      , bytestring
                      , conduit >= 1.1
                      , conduit-extra >= 1.1
                      , containers
                      , iproute >= 1.2.4
                      , mtl
                      , network
                      , network-bytestring
                      , random
                      , resourcet

Test-Suite network
  Type:                 exitcode-stdio-1.0
  Default-Language:     Haskell2010
  Hs-Source-Dirs:       test2
  Ghc-Options:          -Wall
  Main-Is:              Spec.hs
  Other-Modules:        LookupSpec
  Build-Depends:        dns
                      , base
                      , bytestring
                      , hspec

Test-Suite spec
  Type:                 exitcode-stdio-1.0
  Default-Language:     Haskell2010
  Hs-Source-Dirs:       test, .
  Ghc-Options:          -Wall
  Main-Is:              Spec.hs
  Other-Modules:        EncodeSpec
                        DecodeSpec
  Build-Depends:        base
                      , attoparsec
                      , binary
                      , blaze-builder
                      , bytestring
                      , conduit >= 1.1
                      , conduit-extra >= 1.1
                      , containers
                      , dns
                      , hspec
                      , iproute >= 1.2.4
                      , mtl
                      , network >= 2.3
                      , random
                      , resourcet
                      , word8

Test-Suite doctest
  Type:                 exitcode-stdio-1.0
  Default-Language:     Haskell2010
  Hs-Source-Dirs:       test2
  Ghc-Options:          -Wall
  Main-Is:              doctests.hs
  Build-Depends:        base
                      , doctest

Source-Repository head
  Type:                 git
  Location:             git://github.com/kazu-yamamoto/dns.git
