summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam T <sta.cs.vsu@gmail.com>2013-04-03 01:16:20 +0400
committerSam T <sta.cs.vsu@gmail.com>2013-04-03 01:16:20 +0400
commit0ed2dc1155d4de0283c8d6a1e44507083426a9a3 (patch)
tree3a53d370264d263f32c1b8fe9585344ec0c936e3
parent8f4b37b5b930ad456b427e0cf97dac276ec83b4a (diff)
cabalize package
-rw-r--r--.gitignore2
-rw-r--r--.travis.yml4
-rw-r--r--LICENSE19
-rw-r--r--Setup.hs2
-rw-r--r--network-bittorrent.cabal99
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 @@
1dist
2cabal-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 @@
1language: haskell
2
3notifications:
4 email: false
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000..777f89d3
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
1Copyright (c) 2012 Sam T.
2
3Permission is hereby granted, free of charge, to any person obtaining a copy of
4this software and associated documentation files (the "Software"), to deal in
5the Software without restriction, including without limitation the rights to
6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7of the Software, and to permit persons to whom the Software is furnished to do
8so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in all
11copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19SOFTWARE. \ 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 @@
1import Distribution.Simple
2main = 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 @@
1name: network-bittorrent
2version: 0.1.0.0
3synopsis: Straightforward and incomplete implementation of bittorrent protocol.
4description: Straightforward and incomplete implementation of bittorrent protocol.
5license: MIT
6license-file: LICENSE
7author: Sam T.
8maintainer: Sam T. <pxqr.sta@gmail.com>
9copyright: (c) 2013, Sam T.
10category: Network
11build-type: Simple
12cabal-version: >= 1.8
13
14source-repository head
15 type: git
16 location: https://github.com/fmap/network-bittorrent.git
17
18
19library
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
42executable 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
54test-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
70test-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
87benchmark 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