summaryrefslogtreecommitdiff
path: root/krpc.cabal
blob: 908fd770cf04bf05228fe10a59dee972b3f6e079 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name:                  krpc
version:               0.4.1.1
license:               BSD3
license-file:          LICENSE
author:                Sam Truzjan
maintainer:            Sam Truzjan <pxqr.sta@gmail.com>
copyright:             (c) 2013, Sam Truzjan
category:              Network
build-type:            Simple
cabal-version:         >= 1.10
tested-with:           GHC == 7.4.1
                     , GHC == 7.6.3
homepage:              https://github.com/cobit/krpc
bug-reports:           https://github.com/cobit/krpc/issues
synopsis:              KRPC protocol implementation
description:

  The KRPC protocol is a simple RPC mechanism consisting of bencoded
  dictionaries sent over UDP.
  .
  <http://bittorrent.org/beps/bep_0005.html#krpc-protocol>

extra-source-files:    README.md
                     , changelog

source-repository head
  type:                git
  location:            git://github.com/cobit/krpc.git
  branch:              master

source-repository this
  type:                git
  location:            git://github.com/cobit/krpc.git
  branch:              master
  tag:                 v0.4.1.1

library
  default-language:    Haskell2010
  default-extensions:  PatternGuards
                     , RecordWildCards
  hs-source-dirs:      src
  exposed-modules:     Network.KRPC
                       Network.KRPC.Message
                       Network.KRPC.Method
                       Network.KRPC.Manager

  build-depends:       base          == 4.*
                     , bytestring   >= 0.10
                     , lifted-base   >= 0.1.1
                     , transformers  >= 0.2
                     , mtl
                     , monad-control >= 0.3
                     , bencoding    >= 0.4.3
                     , network      >= 2.3
                     , containers

  if impl(ghc < 7.6)
    build-depends:     ghc-prim

  ghc-options:         -Wall


test-suite test-client
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      tests
  main-is:             Client.hs
  other-modules:       Shared
  build-depends:       base        == 4.*
                     , bytestring
                     , process
                     , filepath

                     , bencoding
                     , krpc
                     , network

                     , HUnit
                     , test-framework
                     , test-framework-hunit


--executable test-server
--  default-language:    Haskell2010
--  hs-source-dirs:      tests
--  main-is:             Server.hs
--  other-modules:       Shared
--  build-depends:       base        == 4.*
--                     , bytestring
--                     , bencoding
--                     , krpc
--                     , network

--executable bench-server
--  default-language:    Haskell2010
--  hs-source-dirs:      bench
--  main-is:             Server.hs
--  build-depends:       base        == 4.*
--                     , bytestring
--                     , krpc
--                     , network
--  ghc-options:         -fforce-recomp

benchmark bench-client
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      bench
  main-is:             Main.hs
  build-depends:       base == 4.*
                     , bytestring
                     , criterion
                     , krpc
                     , network
  ghc-options:         -O2 -fforce-recomp