-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrunch.rb
29 lines (24 loc) · 807 Bytes
/
crunch.rb
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 Crunch < Formula
homepage 'http://sourceforge.net/projects/crunch-wordlist/'
url 'http://downloads.sourceforge.net/project/crunch-wordlist/crunch-wordlist/crunch-3.4.tgz'
sha1 '2e73faa0f8f8a9a761c1f191e201d0be76f74491'
def install
# Replace Variables because there is no configure script
inreplace 'Makefile' do |s|
s.remove_make_var! %w[CFLAGS VCFLAGS LFS]
s.change_make_var! "CC", ENV.cc
s.change_make_var! "PREFIX", prefix
s.change_make_var! "BINDIR", bin
s.change_make_var! "MANDIR", man1
end
system "make"
# Installing files directly is easier then patching the Makefile
bin.install ['crunch']
man1.install ['crunch.1']
share.install ['charset.lst']
end
test do
system "#{bin}/crunch"
end
end