blob: cc935f1c43e48a77153b8118ef9bf771d3d6bb4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
require 'formula'
class Whatmask < Formula
homepage 'http://www.laffeycomputer.com/whatmask.html'
url 'http://downloads.laffeycomputer.com/current_builds/whatmask/whatmask-1.2.tar.gz'
sha1 '313762672acacd40de8021132b1024a5c96e2ad5'
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--mandir=#{man}",
"--prefix=#{prefix}"
system "make install"
end
def test
%x[#{bin}/whatmask /24].eql? <<-EOS
---------------------------------------------
TCP/IP SUBNET MASK EQUIVALENTS
---------------------------------------------
CIDR = .....................: /24
Netmask = ..................: 255.255.255.0
Netmask (hex) = ............: 0xffffff00
Wildcard Bits = ............: 0.0.0.255
Usable IP Addresses = ......: 254
EOS
end
end
|