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