]> gitweb.michael.orlitzky.com - hath.git/blob - hath.cabal
Add a description to the cabal file.
[hath.git] / hath.cabal
1 name: hath
2 version: 0.0.1
3 cabal-version: >= 1.8
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 build-type: Simple
7 synopsis:
8 Hath manipulates network blocks in CIDR notation.
9 description:
10 Hath is a Haskell program for working with network blocks in CIDR
11 notation. When dealing with blocks of network addresses, there are a
12 few things that one usually wants to do with them:
13 .
14 * Create a regular expression matching the CIDR block(s). This is
15 because grep will throw up if you feed it CIDR.
16 .
17 * Combine small blocks into larger ones. For example, if you have two
18 consecutive \/24s, they might combine into a larger \/23.
19 .
20 * View the result of block combination in a useful way.
21 .
22 Hath has four modes to perform these functions:
23 .
24 [@Regexed@]
25 This computes a (Perl-compatible) regular expression matching
26 the input CIDR blocks. It's the default mode of operation.
27 .
28 [@Reduced@]
29 This combines small blocks into larger ones where possible, and
30 eliminates redundant blocks. The output should be equivalent to
31 the input, though.
32 .
33 [@Duped@]
34 Shows only the blocks that would be removed by reduce; that is, it
35 shows the ones that would get combined into larger blocks or are
36 simply redundant.
37 .
38 [@Diffed@]
39 Shows what would change if you used reduce. Uses diff-like
40 notation.
41 .
42 /Examples/:
43 .
44 Combine two \/24s into a \/23:
45 .
46 @
47 $ hath reduced <<< \"10.0.0.0\/24 10.0.1.0\/24\"
48 10.0.0.0/23
49 @
50 .
51 Create a perl-compatible regex to be fed to grep:
52 .
53 @
54 $ grep -P `hath regexed -i cidrs.txt` mail.log
55 @
56
57 executable hath
58 build-depends:
59 base == 4.*,
60 HUnit == 1.2.*,
61 QuickCheck == 2.6.*,
62 MissingH == 1.2.*,
63 split == 0.2.*,
64 test-framework == 0.8.*,
65 test-framework-hunit == 0.3.*,
66 test-framework-quickcheck2 == 0.3.*
67
68 main-is:
69 Main.hs
70
71 hs-source-dirs:
72 src/
73
74 ghc-options:
75 -Wall
76 -fwarn-hi-shadowing
77 -fwarn-missing-signatures
78 -fwarn-name-shadowing
79 -fwarn-orphans
80 -fwarn-type-defaults
81 -fwarn-tabs
82 -fwarn-incomplete-record-updates
83 -fwarn-monomorphism-restriction
84 -fwarn-unused-do-bind
85 -rtsopts
86 -threaded
87 -optc-O3
88 -optc-march=native
89 -O2
90
91 ghc-prof-options:
92 -prof
93 -auto-all
94 -caf-all
95
96
97 test-suite testsuite
98 type: exitcode-stdio-1.0
99 hs-source-dirs: src test
100 main-is: TestSuite.hs
101 build-depends:
102 base == 4.*,
103 HUnit == 1.2.*,
104 QuickCheck == 2.6.*,
105 MissingH == 1.2.*,
106 split == 0.2.*,
107 test-framework == 0.8.*,
108 test-framework-hunit == 0.3.*,
109 test-framework-quickcheck2 == 0.3.*
110
111 -- It's not entirely clear to me why I have to reproduce all of this.
112 ghc-options:
113 -Wall
114 -fwarn-hi-shadowing
115 -fwarn-missing-signatures
116 -fwarn-name-shadowing
117 -fwarn-orphans
118 -fwarn-type-defaults
119 -fwarn-tabs
120 -fwarn-incomplete-record-updates
121 -fwarn-monomorphism-restriction
122 -fwarn-unused-do-bind
123 -rtsopts
124 -threaded
125 -optc-O3
126 -optc-march=native
127 -O2
128
129 source-repository head
130 type: git
131 location: http://michael.orlitzky.com/git/hath.git
132 branch: master