Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 28e938c
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'] |
28e938c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
28e938c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.