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