Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Skeleton import after cleanup.

  • Loading branch information...
commit 28e938cf837c6859197000cc647f84f92668f0b6 0 parents
@luislavena luislavena authored
Showing with 88 additions and 0 deletions.
  1. +20 −0 LICENSE
  2. 0  README
  3. +23 −0 Rakefile
  4. +45 −0 tasks/rubygems.rake
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2008 Luis Lavena.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0  README
No changes.
23 Rakefile
@@ -0,0 +1,23 @@
+#--
+# Copyright (c) 2008 Luis Lavena
+#
+# This source code is released under the MIT License.
+# See LICENSE file for details
+#++
+
+#
+# NOTE: Keep this file clean.
+# Add your customizations inside tasks directory.
+# Thank You.
+#
+
+begin
+ require 'rake'
+rescue LoadError
+ require 'rubygems'
+ gem 'rake', '>= 0.8.3', '~> 0.8.4'
+ require 'rake'
+end
+
+# load rakefile extensions (tasks)
+Dir['tasks/*.rake'].each { |f| import f }
45 tasks/rubygems.rake
@@ -0,0 +1,45 @@
+require 'rake/gempackagetask'
+
+spec = Gem::Specification.new do |s|
+ # basic information
+ s.name = "rake-compiler"
+ s.version = "0.1.0"
+ s.platform = Gem::Platform::RUBY
+
+ # description and details
+ s.summary = 'Rake-based Ruby C Extension task generator.'
+ s.description = <<-EOF
+ Provide a spandard and simplified way to build and package
+ Ruby C extensions using Rake as glue.
+ EOF
+
+ # dependencies
+ s.add_dependency 'rake', '>= 0.8.3', '~> 0.8.4'
+
+ # components, files and paths
+ #s.files
+ s.require_path = 'lib'
+
+ # documentation
+ s.has_rdoc = false
+
+ # project information
+ s.homepage = 'TODO'
+ s.rubyforge_project = 'TODO'
+
+ # author and contributors
+ s.author = 'Luis Lavena'
+ s.email = 'luislavena@gmail.com'
+end
+
+gem_package = Rake::GemPackageTask.new(spec) do |pkg|
+ pkg.need_tar = false
+ pkg.need_zip = false
+end
+
+file 'rake-compiler.gemspec' => ['Rakefile', 'tasks/rubygems.rake'] do |t|
+ File.open(t.name, 'w') { |f| f.puts spec.to_yaml }
+end
+
+desc "Generate or update the standalone gemspec file for the project"
+task :gemspec => ['rake-compiler.gemspec']

2 comments on commit 28e938c

@ELLIOTTCABLE

Just wanted to point out that the echoe gem does this, and quite well – automatically compiles well on Mac OS X, all the Linuci I’ve tried it on, and I’ve heard even on Windoze. It also copies the relevant built files (.so/.bundle) to the lib/ directory, so they can be required with the rest of your source. Very slick, and one less dependency, since many things already use echoe/hoe.

@luislavena
Owner

Thank you elliot for pointing this out.

I’ll like to say that Echoe does that since I contributed the patch for it. Also did the same for Hoe and INLINE bundling.

The thing is that both Echoe and Hoe hide all that stuff and doesn’t let you control the way things will be build or bundled in your packages.

The goal of this package is follow up Rake tasks like GemPackageTask or PackageTask to be considered for inclusion in Rake itself.

This tool doesn’t play with manifest files or gemspecs, it just get things built in a standarized way, with the previous mentioned goal and with the objective of cross compilation.

Please sign in to comment.
Something went wrong with that request. Please try again.