Name:                   dns
Version:                4.1.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:          2.0
Build-Type:             Simple
Extra-Source-Files:     Changelog.md
                        cabal.project
                        cbits/dns.c
Tested-With:            GHC == 8.0.2
                      , GHC == 8.2.2
                      , GHC == 8.4.4
                      , GHC == 8.6.5
                      , GHC == 8.8.1

Library dns-internal
  Default-Language:     Haskell2010
  GHC-Options:          -Wall
  Hs-Source-Dirs:       internal
  Exposed-Modules:      Network.DNS.Imports
                        Network.DNS.Types.Internal
                        Network.DNS.Types.Resolver
                        Network.DNS.Resolver.Internal
                        Network.DNS.Decode.Parsers
                        Network.DNS.Decode.Internal
                        Network.DNS.Encode.Builders
                        Network.DNS.Encode.Internal
                        Network.DNS.StateBinary
                        Network.DNS.Memo
                        Network.DNS.Base32Hex
  Build-Depends:        base
                      , array
                      , async
                      , attoparsec
                      , auto-update
                      , base16-bytestring
                      , base64-bytestring
                      , bytestring
                      , case-insensitive
                      , containers
                      , cryptonite
                      , hourglass
                      , iproute
                      , mtl
                      , network
                      , psqueues
  if os(windows)
    C-Sources:        cbits/dns.c
    Extra-Libraries:  iphlpapi

Library
  Default-Language:     Haskell2010
  GHC-Options:          -Wall
  Exposed-Modules:      Network.DNS
                        Network.DNS.Lookup
                        Network.DNS.LookupRaw
                        Network.DNS.Resolver
                        Network.DNS.Utils
                        Network.DNS.Types
                        Network.DNS.Decode
                        Network.DNS.Encode
                        Network.DNS.IO
  Other-Modules:        Network.DNS.Transport
  Build-Depends:        dns-internal
                      , base >= 4 && < 5
                      , array
                      , async
                      , attoparsec
                      , auto-update
                      , base16-bytestring
                      , base64-bytestring
                      , bytestring
                      , containers
                      , cryptonite
                      , hourglass
                      , iproute >= 1.3.2
                      , mtl
                      , network >= 2.3
                      , psqueues

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

Test-Suite spec-tests
  Type:                 exitcode-stdio-1.0
  Default-Language:     Haskell2010
  Hs-Source-Dirs:       test
  Ghc-Options:          -Wall
  Main-Is:              Spec.hs
  Other-Modules:        EncodeSpec
                        DecodeSpec
                        RoundTripSpec
  Build-Depends:        dns
                      , dns-internal
                      , QuickCheck >= 2.9
                      , base
                      , bytestring
                      , case-insensitive
                      , hspec
                      , iproute >= 1.3.2
                      , word8
  Build-Tool-Depends:   hspec-discover:hspec-discover

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

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