Author: mcpierce
Date: Thu Oct  4 19:54:41 2012
New Revision: 1394226

URL: http://svn.apache.org/viewvc?rev=1394226&view=rev
Log:
PROTON-3 : Provides a means for packaging Proton as a Ruby gem.

The gem's name is qpid_proton (since proton was already taken).

Provides a Rakefile with two targets:
 1. generates the cproton.c file from the swig bindings file, and
 2. packages up everything into a gem file for distribution.

Also provides the basic Proton ruby library files.

Added:
    qpid/proton/trunk/proton-c/bindings/ruby/.gitignore
    qpid/proton/trunk/proton-c/bindings/ruby/README.rdoc
    qpid/proton/trunk/proton-c/bindings/ruby/Rakefile
    qpid/proton/trunk/proton-c/bindings/ruby/ext/
    qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/
    qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/extconf.rb
    qpid/proton/trunk/proton-c/bindings/ruby/lib/
    qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/
    qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton.rb
    qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/version.rb

Added: qpid/proton/trunk/proton-c/bindings/ruby/.gitignore
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/.gitignore?rev=1394226&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/.gitignore (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/.gitignore Thu Oct  4 19:54:41 2012
@@ -0,0 +1 @@
+ext/cproton/cproton.c

Added: qpid/proton/trunk/proton-c/bindings/ruby/README.rdoc
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/README.rdoc?rev=1394226&view=auto
==============================================================================
    (empty)

Added: qpid/proton/trunk/proton-c/bindings/ruby/Rakefile
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/Rakefile?rev=1394226&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/Rakefile (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/Rakefile Thu Oct  4 19:54:41 2012
@@ -0,0 +1,68 @@
+# Rakefile for Qpid -*- ruby -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require "rubygems"
+require "rubygems/package_task"
+
+require "rake/clean"
+
+CLOBBER.include("ext/cproton/cproton.c")
+
+load "lib/qpid_proton/version.rb"
+
+task :package => :swig
+
+task :swig do
+  system "swig -ruby -I../../include -o ext/cproton/cproton.c ruby.i"
+end
+
+# Gem specification and packaging
+spec = Gem::Specification.new do |s|
+  s.name = Qpid::Proton::NAME
+  s.version = Qpid::Proton::VERSION
+  s.platform = Gem::Platform::RUBY
+
+  s.author = "Darryl L. Pierce"
+  s.email = "[email protected]"
+  s.homepage = "http://qpid.apache.org/proton";
+  s.license = "ASL"
+
+  s.summary = "Ruby language bindings for the Qpid Proton messaging framework"
+  s.description = <<-EOF
+Proton is a high performance, lightweight messaging library. It can be used in
+the widest range of messaging applications including brokers, client libraries,
+routers, bridges, proxies, and more. Proton is based on the AMQP 1.0 messaging
+standard.
+EOF
+  s.rubyforge_project = "qpid_proton"
+
+  s.requirements << "none"
+  s.require_path = "lib"
+  s.extensions << "ext/cproton/extconf.rb"
+
+  s.files = Dir[
+                "ext/cproton/*.rb",
+                "ext/cproton/*.c",
+                "lib/**/*.rb"
+                ]
+end
+
+Gem::PackageTask.new(spec) do |pkg|
+end

Added: qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/extconf.rb
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/extconf.rb?rev=1394226&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/extconf.rb (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/ext/cproton/extconf.rb Thu Oct  4 
19:54:41 2012
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'mkmf'
+
+dir_config("qpid-proton")
+
+REQUIRED_LIBRARIES = [
+                      "qpid-proton",
+                     ]
+
+REQUIRED_LIBRARIES.each do |library|
+  abort "Missing library: #{library}" unless have_library library
+end
+
+REQUIRED_HEADERS = [
+                    "proton/engine.h",
+                    "proton/message.h",
+                    "proton/sasl.h",
+                    "proton/driver.h",
+                    "proton/messenger.h"
+                   ]
+
+REQUIRED_HEADERS.each do |header|
+  abort "Missing header: #{header}" unless have_header header
+end
+
+create_makefile('cproton')
+

Added: qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton.rb
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton.rb?rev=1394226&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton.rb (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton.rb Thu Oct  4 
19:54:41 2012
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require "cproton"
+
+require "qpid_proton/version"
+

Added: qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/version.rb
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/version.rb?rev=1394226&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/version.rb (added)
+++ qpid/proton/trunk/proton-c/bindings/ruby/lib/qpid_proton/version.rb Thu Oct 
 4 19:54:41 2012
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+module Qpid
+
+  module Proton
+
+    NAME = "qpid_proton"
+    VERSION = "0.0.1"
+
+  end
+
+end



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to