aboutsummaryrefslogtreecommitdiffstats
path: root/Formula/dmd.rb
diff options
context:
space:
mode:
authorMax Howell2009-05-21 00:04:43 +0100
committerMax Howell2009-05-21 00:04:43 +0100
commit84c5c3e5c301382ede5b1f04c7440ee9055589af (patch)
treefe8248a0b54da1dbb92693f9dca7db0c6bb56ed9 /Formula/dmd.rb
parent29d85578e75170a6c0eaebda4d701b46f1acf446 (diff)
downloadbrew-0.1.tar.bz2
The core tree, and some formulae0.1
Diffstat (limited to 'Formula/dmd.rb')
-rw-r--r--Formula/dmd.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/Formula/dmd.rb b/Formula/dmd.rb
new file mode 100644
index 000000000..0c0c7f6d7
--- /dev/null
+++ b/Formula/dmd.rb
@@ -0,0 +1,23 @@
+$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew" #rubysucks
+require 'brewkit'
+
+homepage='http://www.digitalmars.com/d/'
+url='http://ftp.digitalmars.com/dmd.1.043.zip'
+md5='6c83b7296cb84090a9ebc11ab0fb94a2'
+
+Formula.new(url, md5).brew do |prefix|
+ prefix.mkpath
+ FileUtils.cp_r 'osx/bin', prefix
+ FileUtils.cp_r 'osx/lib', prefix
+ FileUtils.cp_r 'man', prefix
+ FileUtils.cp_r 'man', prefix
+
+ share=prefix+'share'+'doc'+'d'
+ html=share+'html'
+ samples=share+'examples' #examples is the more typical directory name
+ html.mkpath
+ samples.mkpath
+
+ FileUtils.cp_r Dir['html/d/*'], html unless ARGV.include? '--no-html'
+ FileUtils.cp_r Dir['samples/d/*'], samples unless ARGV.include? '--no-samples'
+end \ No newline at end of file