]> gitweb.michael.orlitzky.com - hath.git/blob - hath.cabal
Version bump again, include the man page in the source distribution.
[hath.git] / hath.cabal
1 name: hath
2 version: 0.0.3
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.*,
66 HUnit == 1.2.*,
67 QuickCheck == 2.6.*,
68 MissingH == 1.2.*,
69 split == 0.2.*,
70 test-framework == 0.8.*,
71 test-framework-hunit == 0.3.*,
72 test-framework-quickcheck2 == 0.3.*
73
74 main-is:
75 Main.hs
76
77 hs-source-dirs:
78 src/
79
80 other-modules:
81 Bit
82 Cidr
83 CommandLine
84 ExitCodes
85 IPv4Address
86 Maskable
87 Maskbits
88 Octet
89
90 ghc-options:
91 -Wall
92 -fwarn-hi-shadowing
93 -fwarn-missing-signatures
94 -fwarn-name-shadowing
95 -fwarn-orphans
96 -fwarn-type-defaults
97 -fwarn-tabs
98 -fwarn-incomplete-record-updates
99 -fwarn-monomorphism-restriction
100 -fwarn-unused-do-bind
101 -rtsopts
102 -threaded
103 -optc-O3
104 -optc-march=native
105 -O2
106
107 ghc-prof-options:
108 -prof
109 -auto-all
110 -caf-all
111
112
113 test-suite testsuite
114 type: exitcode-stdio-1.0
115 hs-source-dirs: src test
116 main-is: TestSuite.hs
117 build-depends:
118 base == 4.*,
119 HUnit == 1.2.*,
120 QuickCheck == 2.6.*,
121 MissingH == 1.2.*,
122 split == 0.2.*,
123 test-framework == 0.8.*,
124 test-framework-hunit == 0.3.*,
125 test-framework-quickcheck2 == 0.3.*
126
127 -- It's not entirely clear to me why I have to reproduce all of this.
128 ghc-options:
129 -Wall
130 -fwarn-hi-shadowing
131 -fwarn-missing-signatures
132 -fwarn-name-shadowing
133 -fwarn-orphans
134 -fwarn-type-defaults
135 -fwarn-tabs
136 -fwarn-incomplete-record-updates
137 -fwarn-monomorphism-restriction
138 -fwarn-unused-do-bind
139 -rtsopts
140 -threaded
141 -optc-O3
142 -optc-march=native
143 -O2
144
145 source-repository head
146 type: git
147 location: http://michael.orlitzky.com/git/hath.git
148 branch: master