[Pkg-cli-libs-commits] [SCM] ironruby branch, master, updated. debian/20090805+git.e6b28d27+dfsg-1-18-g40786fb
C.J. Adams-Collier
cjac at colliertech.org
Mon Feb 15 18:26:36 UTC 2010
The following commit has been merged in the master branch:
commit 40786fb9f28e10a40cc7becad4c65d8a54b0e2c1
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date: Mon Feb 15 10:25:15 2010 -0800
moved scripts needing tweaking and extra deps into the utils package
added scripts from external packages, changed #! lines
diff --git a/debian/control b/debian/control
index ba06ab7..15b4949 100644
--- a/debian/control
+++ b/debian/control
@@ -32,7 +32,7 @@ Description: Ruby implementation targeting the .NET and Mono platforms
Package: ironruby-utils
Section: ruby
Architecture: all
-Depends: ${cli:Depends}, ${misc:Depends}, rdoc, ironruby, rake
+Depends: ${cli:Depends}, ${misc:Depends}, rdoc, ironruby, rake, librack-ruby1.8, ri1.8
Homepage: http://www.ironruby.net/
Description: Utility tools for IronRuby
Utilities distributed with IronRuby
diff --git a/debian/copyright b/debian/copyright
index f80d4af..6f5f059 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -196,6 +196,7 @@ Merlin/Main/Languages/Ruby/Scripts/bin/irails
Merlin/Main/Languages/Ruby/Scripts/bin/irake
Merlin/Main/Languages/Ruby/Scripts/bin/irdoc
Merlin/Main/Languages/Ruby/Scripts/bin/iri
+debian/iri
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/RubyGems-1_3_1-test/test_gem_specification.rb
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/RubyGems-1_3_1-test/test_gem_package_tar_writer.rb
@@ -309,6 +310,9 @@ Copyright 2003, 2004, 2005 by Jim Weirich (jim at weirichhouse.org)
Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/*
Copyright (c) 2008 Engine Yard, Inc. All rights reserved.
+debian/irackup
+Copyright (c) 2007, 2008, 2009 Christian Neukirchen <chneukirchen at gmail.com>
+
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/debian/irackup b/debian/irackup
new file mode 100755
index 0000000..671e580
--- /dev/null
+++ b/debian/irackup
@@ -0,0 +1,180 @@
+#!/usr/bin/env ir
+
+# This script is from the librack-ruby1.8 package with only the #!
+# line changed
+
+# -*- ruby -*-
+
+$LOAD_PATH.unshift File.expand_path("#{__FILE__}/../../lib")
+autoload :Rack, 'rack'
+
+require 'optparse'
+
+automatic = false
+server = nil
+env = "development"
+daemonize = false
+pid = nil
+options = {:Port => 9292, :Host => "0.0.0.0", :AccessLog => []}
+
+# Don't evaluate CGI ISINDEX parameters.
+# http://hoohoo.ncsa.uiuc.edu/cgi/cl.html
+ARGV.clear if ENV.include?("REQUEST_METHOD")
+
+opts = OptionParser.new("", 24, ' ') { |opts|
+ opts.banner = "Usage: rackup [ruby options] [rack options] [rackup config]"
+
+ opts.separator ""
+ opts.separator "Ruby options:"
+
+ lineno = 1
+ opts.on("-e", "--eval LINE", "evaluate a LINE of code") { |line|
+ eval line, TOPLEVEL_BINDING, "-e", lineno
+ lineno += 1
+ }
+
+ opts.on("-d", "--debug", "set debugging flags (set $DEBUG to true)") {
+ $DEBUG = true
+ }
+ opts.on("-w", "--warn", "turn warnings on for your script") {
+ $-w = true
+ }
+
+ opts.on("-I", "--include PATH",
+ "specify $LOAD_PATH (may be used more than once)") { |path|
+ $LOAD_PATH.unshift(*path.split(":"))
+ }
+
+ opts.on("-r", "--require LIBRARY",
+ "require the library, before executing your script") { |library|
+ require library
+ }
+
+ opts.separator ""
+ opts.separator "Rack options:"
+ opts.on("-s", "--server SERVER", "serve using SERVER (webrick/mongrel)") { |s|
+ server = s
+ }
+
+ opts.on("-o", "--host HOST", "listen on HOST (default: 0.0.0.0)") { |host|
+ options[:Host] = host
+ }
+
+ opts.on("-p", "--port PORT", "use PORT (default: 9292)") { |port|
+ options[:Port] = port
+ }
+
+ opts.on("-E", "--env ENVIRONMENT", "use ENVIRONMENT for defaults (default: development)") { |e|
+ env = e
+ }
+
+ opts.on("-D", "--daemonize", "run daemonized in the background") { |d|
+ daemonize = d ? true : false
+ }
+
+ opts.on("-P", "--pid FILE", "file to store PID (default: rack.pid)") { |f|
+ pid = File.expand_path(f)
+ }
+
+ opts.separator ""
+ opts.separator "Common options:"
+
+ opts.on_tail("-h", "--help", "Show this message") do
+ puts opts
+ exit
+ end
+
+ opts.on_tail("--version", "Show version") do
+ puts "Rack #{Rack.version}"
+ exit
+ end
+
+ opts.parse! ARGV
+}
+
+require 'pp' if $DEBUG
+
+config = ARGV[0] || "config.ru"
+if !File.exist? config
+ abort "configuration #{config} not found"
+end
+
+if config =~ /\.ru$/
+ cfgfile = File.read(config)
+ if cfgfile[/^#\\(.*)/]
+ opts.parse! $1.split(/\s+/)
+ end
+ inner_app = eval "Rack::Builder.new {( " + cfgfile + "\n )}.to_app",
+ nil, config
+else
+ require config
+ inner_app = Object.const_get(File.basename(config, '.rb').capitalize)
+end
+
+unless server = Rack::Handler.get(server)
+ # Guess.
+ if ENV.include?("PHP_FCGI_CHILDREN")
+ server = Rack::Handler::FastCGI
+
+ # We already speak FastCGI
+ options.delete :File
+ options.delete :Port
+ elsif ENV.include?("REQUEST_METHOD")
+ server = Rack::Handler::CGI
+ else
+ begin
+ server = Rack::Handler::Mongrel
+ rescue LoadError => e
+ server = Rack::Handler::WEBrick
+ end
+ end
+end
+
+p server if $DEBUG
+
+case env
+when "development"
+ app = Rack::Builder.new {
+ use Rack::CommonLogger, $stderr unless server.name =~ /CGI/
+ use Rack::ShowExceptions
+ use Rack::Lint
+ run inner_app
+ }.to_app
+
+when "deployment"
+ app = Rack::Builder.new {
+ use Rack::CommonLogger, $stderr unless server.name =~ /CGI/
+ run inner_app
+ }.to_app
+
+when "none"
+ app = inner_app
+
+end
+
+if $DEBUG
+ pp app
+ pp inner_app
+end
+
+if daemonize
+ if RUBY_VERSION < "1.9"
+ exit if fork
+ Process.setsid
+ exit if fork
+ Dir.chdir "/"
+ File.umask 0000
+ STDIN.reopen "/dev/null"
+ STDOUT.reopen "/dev/null", "a"
+ STDERR.reopen "/dev/null", "a"
+ else
+ Process.daemon
+ end
+
+ if pid
+ File.open(pid, 'w'){ |f| f.write("#{Process.pid}") }
+ at_exit { File.delete(pid) if File.exist?(pid) }
+ end
+end
+
+server.run app, options
diff --git a/Merlin/Main/Languages/Ruby/Scripts/bin/iri b/debian/iri
old mode 100644
new mode 100755
similarity index 95%
copy from Merlin/Main/Languages/Ruby/Scripts/bin/iri
copy to debian/iri
index f6d3580..5a6cc90
--- a/Merlin/Main/Languages/Ruby/Scripts/bin/iri
+++ b/debian/iri
@@ -1,4 +1,7 @@
#!/usr/bin/env ir
+
+# This script is from the ri1.8 package with only the #! line changed
+
# usage:
#
# ri name...
@@ -46,3 +49,4 @@ require 'rdoc/ri/ri_driver'
ri = RiDriver.new
ri.process_args
+
diff --git a/debian/ironruby-utils.install b/debian/ironruby-utils.install
index 2f7290b..d2a18cf 100644
--- a/debian/ironruby-utils.install
+++ b/debian/ironruby-utils.install
@@ -1,3 +1,6 @@
debian/irake /usr/bin
+debian/irackup /usr/bin
+debian/iri /usr/bin
+Merlin/Main/Languages/Ruby/Scripts/bin/igem /usr/bin
Merlin/Main/Languages/Ruby/Scripts/bin/irdoc /usr/bin
#Merlin/Main/Languages/Ruby/Scripts/bin/irails /usr/bin
diff --git a/debian/ironruby.install b/debian/ironruby.install
index b51a434..d2f0346 100644
--- a/debian/ironruby.install
+++ b/debian/ironruby.install
@@ -4,7 +4,4 @@ Merlin/Main/Languages/Ruby/Libs /usr/lib/ironruby
Merlin/Main/Bin/Debug/ir.exe* /usr/lib/ironruby
debian/ir /usr/bin
debian/ir.exe.config /usr/lib/ironruby
-Merlin/Main/Languages/Ruby/Scripts/bin/igem /usr/bin
Merlin/Main/Languages/Ruby/Scripts/bin/iirb /usr/bin
-Merlin/Main/Languages/Ruby/Scripts/bin/irackup /usr/bin
-Merlin/Main/Languages/Ruby/Scripts/bin/iri /usr/bin
--
ironruby
More information about the Pkg-cli-libs-commits
mailing list