File: extension.rake

package info (click to toggle)
libffi-ruby 0.6.3debian-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,072 kB
  • ctags: 1,458
  • sloc: ansic: 5,824; ruby: 5,402; xml: 144; sh: 73; makefile: 7
file content (25 lines) | stat: -rw-r--r-- 1,159 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
spec = Gem::Specification.new do |s|
  s.name = PROJ.name
  s.version = PROJ.version
  s.platform = Gem::Platform::RUBY
  s.has_rdoc = true
  s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
  s.summary = PROJ.summary
  s.description = PROJ.description
  s.authors = Array(PROJ.authors)
  s.email = PROJ.email
  s.homepage = Array(PROJ.url).first
  s.rubyforge_project = PROJ.rubyforge.name
  s.extensions = %w(ext/ffi_c/extconf.rb gen/Rakefile)
  s.require_path = 'lib'
  s.files = PROJ.gem.files
  s.add_dependency *PROJ.gem.dependencies.flatten
end

Rake::ExtensionTask.new('ffi_c', spec) do |ext|
  ext.name = 'ffi_c'                                        # indicate the name of the extension.
  # ext.lib_dir = BUILD_DIR                                 # put binaries into this folder.
  ext.tmp_dir = BUILD_DIR                                   # temporary folder used during compilation.
  ext.cross_compile = true                                  # enable cross compilation (requires cross compile toolchain)
  ext.cross_platform = ['i386-mingw32', 'i386-mswin32']     # forces the Windows platform instead of the default one
end if USE_RAKE_COMPILER