5 Echoe.new("unicorn") do |p|
6 p.summary = "A small fast HTTP library and server for Rack applications."
8 p.email = "normalperson@yhbt.net"
9 p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'coverage', 'test_*.log', 'log', 'doc']
10 p.url = "http://unicorn.bogomips.org"
11 p.rdoc_pattern = ['README', 'LICENSE', 'CONTRIBUTORS', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
12 p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
16 p.extension_pattern = ["ext/**/extconf.rb"]
18 # Eric hasn't bothered to figure out running exec tests properly
19 # from Rake, but Eric prefers GNU make to Rake for tests anyways...
20 p.test_pattern = [ 'test/unit/test*.rb' ]
25 desc "Rebuild the Ragel sources"
27 Dir.chdir "ext/http11" do
28 target = "http11_parser.c"
29 File.unlink target if File.exist? target
30 sh "ragel http11_parser.rl -C -G2 -o #{target}"
31 raise "Failed to build C source" unless File.exist? target
35 #### Pre-compiled extensions for alternative platforms
38 Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }