-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboo.rb
40 lines (33 loc) · 1002 Bytes
/
boo.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
30
31
32
33
34
35
36
37
38
39
40
require 'formula'
class Boo < Formula
homepage 'http://boo.codehaus.org/'
url 'http://dist.codehaus.org/boo/distributions/boo-0.9.4.9-bin.zip'
sha1 'fccaf3b99b427e9bb14b1fc68d30c8c4d44bc05b'
depends_on 'mono'
# Return wrapper script to set mono path to boo libraries.
def mono_exec(name)
<<-EOS.undent
#!/bin/sh
MONO_PATH=$MONO_PATH:#{libexec}/lib /usr/local/bin/mono "#{libexec}/bin/#{name}.exe" "$@"
EOS
end
def install
# install wrapper scripts for executables
Dir['bin/*.exe'].each do |file|
fn = File.basename(file, '.exe')
(bin+fn).write mono_exec(fn)
end
# install executables, libraries
cd 'bin' do
(libexec+'lib').install Dir['*.dll']
(libexec+'bin').install Dir['boo.*','booc.*','booi.*','booish.*']
end
# install docs, extras
doc.install Dir['docs/*']
(doc+'examples').install Dir['examples/*']
prefix.install 'extras'
end
def test
system "#{bin}/booi", "/dev/null"
end
end