diff options
author | Sam T <sta.cs.vsu@gmail.com> | 2013-04-03 01:16:20 +0400 |
---|---|---|
committer | Sam T <sta.cs.vsu@gmail.com> | 2013-04-03 01:16:20 +0400 |
commit | 0ed2dc1155d4de0283c8d6a1e44507083426a9a3 (patch) | |
tree | 3a53d370264d263f32c1b8fe9585344ec0c936e3 | |
parent | 8f4b37b5b930ad456b427e0cf97dac276ec83b4a (diff) |
cabalize package
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | LICENSE | 19 | ||||
-rw-r--r-- | Setup.hs | 2 | ||||
-rw-r--r-- | network-bittorrent.cabal | 99 |
5 files changed, 126 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..316009b8 --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | dist | ||
2 | cabal-dev | ||
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..d02c670f --- /dev/null +++ b/.travis.yml | |||
@@ -0,0 +1,4 @@ | |||
1 | language: haskell | ||
2 | |||
3 | notifications: | ||
4 | email: false | ||
diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..777f89d3 --- /dev/null +++ b/LICENSE | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (c) 2012 Sam T. | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
4 | this software and associated documentation files (the "Software"), to deal in | ||
5 | the Software without restriction, including without limitation the rights to | ||
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
7 | of the Software, and to permit persons to whom the Software is furnished to do | ||
8 | so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in all | ||
11 | copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
19 | SOFTWARE. \ No newline at end of file | ||
diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/Setup.hs | |||
@@ -0,0 +1,2 @@ | |||
1 | import Distribution.Simple | ||
2 | main = defaultMain | ||
diff --git a/network-bittorrent.cabal b/network-bittorrent.cabal new file mode 100644 index 00000000..2a4b28b0 --- /dev/null +++ b/network-bittorrent.cabal | |||
@@ -0,0 +1,99 @@ | |||
1 | name: network-bittorrent | ||
2 | version: 0.1.0.0 | ||
3 | synopsis: Straightforward and incomplete implementation of bittorrent protocol. | ||
4 | description: Straightforward and incomplete implementation of bittorrent protocol. | ||
5 | license: MIT | ||
6 | license-file: LICENSE | ||
7 | author: Sam T. | ||
8 | maintainer: Sam T. <pxqr.sta@gmail.com> | ||
9 | copyright: (c) 2013, Sam T. | ||
10 | category: Network | ||
11 | build-type: Simple | ||
12 | cabal-version: >= 1.8 | ||
13 | |||
14 | source-repository head | ||
15 | type: git | ||
16 | location: https://github.com/fmap/network-bittorrent.git | ||
17 | |||
18 | |||
19 | library | ||
20 | exposed-modules: Data.Torrent | ||
21 | , Network.Torrent.THP | ||
22 | , Network.Torrent.PWP | ||
23 | -- other-modules: | ||
24 | build-depends: base == 4.5.* | ||
25 | , bytestring >= 0.10.2.0 | ||
26 | , containers >= 0.4.2.1 | ||
27 | |||
28 | , bencoding >= 0.1.0.0 | ||
29 | , network >= 2.4.1.2 | ||
30 | , HTTP >= 4000.2.8 | ||
31 | , url >= 2.1.3 | ||
32 | , urlencoded >= 0.4.0 | ||
33 | , cereal >= 0.3.5.2 | ||
34 | , cryptohash | ||
35 | , text >= 0.11.2.3 | ||
36 | , directory-tree >= 0.11.0 | ||
37 | extensions: PatternGuards | ||
38 | hs-source-dirs: src | ||
39 | |||
40 | |||
41 | |||
42 | executable client | ||
43 | main-is: client.hs | ||
44 | build-depends: base == 4.5.* | ||
45 | , bytestring >= 0.10.2.0 | ||
46 | , bencoding >= 0.1.0.0 | ||
47 | , network-bittorrent >= 0.1.0.0 | ||
48 | |||
49 | hs-source-dirs: tests | ||
50 | ghc-options: -Wall -O2 | ||
51 | |||
52 | |||
53 | |||
54 | test-suite info-hash.hs | ||
55 | type: exitcode-stdio-1.0 | ||
56 | main-is: info-hash.hs | ||
57 | hs-source-dirs: tests | ||
58 | |||
59 | build-depends: base == 4.5.* | ||
60 | , bytestring >= 0.10.2.0 | ||
61 | , containers >= 0.4.2.1 | ||
62 | , bencoding >= 0.1.0.0 | ||
63 | , network-bittorrent >= 0.1.0.0 | ||
64 | , Diff | ||
65 | |||
66 | ghc-options: -Wall | ||
67 | |||
68 | |||
69 | |||
70 | test-suite encoding | ||
71 | type: exitcode-stdio-1.0 | ||
72 | main-is: encoding.hs | ||
73 | hs-source-dirs: tests | ||
74 | |||
75 | build-depends: base == 4.5.* | ||
76 | , bytestring >= 0.10.2.0 | ||
77 | , cereal >= 0.3.5.2 | ||
78 | , test-framework | ||
79 | , test-framework-quickcheck2 | ||
80 | , QuickCheck | ||
81 | , network-bittorrent >= 0.1.0.0 | ||
82 | |||
83 | ghc-options: -Wall -fno-warn-orphans | ||
84 | |||
85 | |||
86 | |||
87 | benchmark serialization | ||
88 | type: exitcode-stdio-1.0 | ||
89 | main-is: serialization.hs | ||
90 | hs-source-dirs: bench | ||
91 | |||
92 | build-depends: base == 4.5.* | ||
93 | , bytestring >= 0.10.2.0 | ||
94 | , criterion | ||
95 | , cereal | ||
96 | , network-bittorrent >= 0.1.0.0 | ||
97 | , deepseq | ||
98 | |||
99 | ghc-options: -O2 -Wall -fno-warn-orphans | ||