]> gitweb.michael.orlitzky.com - dead/harbl.git/blobdiff - harbl.cabal
Separate the Network.DNS.RBL.Weight module and fix the doctests.
[dead/harbl.git] / harbl.cabal
index b497fb63efb6c73b63940917ed72d682b2db87ae..a970d307a43e390e50159990d18890941895bd6a 100644 (file)
@@ -4,7 +4,7 @@ cabal-version:  >= 1.8
 author:         Michael Orlitzky
 maintainer:    Michael Orlitzky <michael@orlitzky.com>
 category:       Utils
-license:        GPL-3
+license:        AGPL-3
 license-file:   doc/LICENSE
 build-type:     Simple
 synopsis:
@@ -13,16 +13,72 @@ description:
   Provides utility functions for performing blacklist lookups.
 
 
+library
+  build-depends:
+    base                        >= 4.6 && < 5,
+    bytestring                  >= 0.9,
+    dns                         >= 2,
+    iproute                     >= 1.4,
+    parsec                      >= 3,
+    tasty                       >= 0.8,
+    tasty-hunit                 >= 0.8
+
+  exposed-modules:
+    Network.DNS.RBL
+    Network.DNS.RBL.Tests
+    Network.DNS.RBL.Weight
+
+  other-modules:
+    Network.DNS.RBL.Domain.Digit
+    Network.DNS.RBL.Domain.Domain
+    Network.DNS.RBL.Domain.Hyphen
+    Network.DNS.RBL.Domain.Label
+    Network.DNS.RBL.Domain.LdhStr
+    Network.DNS.RBL.Domain.LdhStrLetDig
+    Network.DNS.RBL.Domain.LetDig
+    Network.DNS.RBL.Domain.LetDigHyp
+    Network.DNS.RBL.Domain.Letter
+    Network.DNS.RBL.Domain.Subdomain
+    Network.DNS.RBL.Host
+    Network.DNS.RBL.IPv4Pattern
+    Network.DNS.RBL.Pretty
+    Network.DNS.RBL.Reversible
+    Network.DNS.RBL.Site
+
+  hs-source-dirs: harbl/src
+
+  ghc-options:
+    -Wall
+    -fwarn-hi-shadowing
+    -fwarn-missing-signatures
+    -fwarn-name-shadowing
+    -fwarn-orphans
+    -fwarn-type-defaults
+    -fwarn-tabs
+    -fwarn-incomplete-record-updates
+    -fwarn-monomorphism-restriction
+    -fwarn-unused-do-bind
+    -O2
+
+  ghc-prof-options:
+    -prof
+    -fprof-auto
+    -fprof-cafs
+
+
 executable harbl
   build-depends:
     base                        >= 4.6 && < 5,
+    cmdargs                     >= 0.10.6,
+    configurator                >= 0.2,
+    directory,
+    filepath,
+    harbl,
     parsec                      >= 3
 
-  main-is:
-    Main.hs
+  main-is: Main.hs
 
-  hs-source-dirs:
-    src/
+  hs-source-dirs: harbl-cli/src
 
   ghc-options:
     -Wall
@@ -42,6 +98,61 @@ executable harbl
     -fprof-auto
     -fprof-cafs
 
+
+test-suite testsuite
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: TestSuite.hs
+  build-depends:
+    base                        >= 4.6 && < 5,
+    harbl,
+    tasty                       >= 0.8,
+    tasty-hunit                 >= 0.8
+
+  -- It's not entirely clear to me why I have to reproduce all of this.
+  ghc-options:
+    -Wall
+    -fwarn-hi-shadowing
+    -fwarn-missing-signatures
+    -fwarn-name-shadowing
+    -fwarn-orphans
+    -fwarn-type-defaults
+    -fwarn-tabs
+    -fwarn-incomplete-record-updates
+    -fwarn-monomorphism-restriction
+    -fwarn-unused-do-bind
+    -O2
+
+
+test-suite doctests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: Doctests.hs
+  build-depends:
+    base      >= 4.6 && < 5,
+    -- Additional test dependencies.
+    doctest   >= 0.9,
+    filemanip >= 0.3.6
+
+  -- It's not entirely clear to me why I have to reproduce all of this.
+  ghc-options:
+    -Wall
+    -fwarn-hi-shadowing
+    -fwarn-missing-signatures
+    -fwarn-name-shadowing
+    -fwarn-orphans
+    -fwarn-type-defaults
+    -fwarn-tabs
+    -fwarn-incomplete-record-updates
+    -fwarn-monomorphism-restriction
+    -fwarn-unused-do-bind
+    -rtsopts
+    -threaded
+    -optc-O3
+    -optc-march=native
+    -O2
+
+
 source-repository head
   type: git
   location: http://michael.orlitzky.com/git/harbl.git