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