Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 68 lines (56 sloc) 2.642 kb
c5d3bca restructured to build rubygems-packages based on hoe and rake-compiler
Kanis-Küche authored
1 # -*- coding: utf-8 -*-
2 # -*- ruby -*-
3
4 require 'rubygems'
5 require 'hoe'
6 require 'rake/extensiontask'
7
7f3cf8c Lars Kanis renamed autogenerated files from *.c to *.inc to avoid problems with ext...
authored
8 CLEAN.include 'ext/pk11_struct_def.inc'
9 CLEAN.include 'ext/pk11_struct_impl.inc'
10 CLEAN.include 'ext/pk11_const_def.inc'
16cf225 Lars Kanis Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
authored
11 CLEAN.include 'ext/pk11_thread_funcs.h'
12 CLEAN.include 'ext/pk11_thread_funcs.c'
7b35d4b Add parser for PKCS#11 structs and generator for Ruby wrapper classes
Lars Kanis authored
13 CLEAN.include 'lib/pkcs11_ext.so'
7f3cf8c Lars Kanis renamed autogenerated files from *.c to *.inc to avoid problems with ext...
authored
14 CLEAN.include 'tmp'
7b35d4b Add parser for PKCS#11 structs and generator for Ruby wrapper classes
Lars Kanis authored
15
c5d3bca restructured to build rubygems-packages based on hoe and rake-compiler
Kanis-Küche authored
16 hoe = Hoe.spec 'pkcs11' do
17 developer('Ryosuke Kutsuna', 'ryosuke@deer-n-horse.jp')
18 developer('GOTOU Yuuzou', 'gotoyuzo@notwork.org')
19 developer('Lars Kanis', 'kanis@comcard.de')
dca40ba Add summary and description to Rakefile - were missing for the 0.1.0 rel...
Kanis-Küche authored
20
12b7ed0 Add project homepage to Rakefile, because it's misinterpretet from READM...
Kanis-Küche authored
21 self.url = 'http://github.com/larskanis/pkcs11'
dca40ba Add summary and description to Rakefile - were missing for the 0.1.0 rel...
Kanis-Küche authored
22 self.summary = 'PKCS#11 binding for Ruby'
23 self.description = 'This module allows Ruby programs to interface with "RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki)".'
24
9713aa5 Updated README file
Kanis-Küche authored
25 self.readme_file = 'README.rdoc'
e15e8e8 include pk11.c into rdoc to get PKCS.open documented
Kanis-Küche authored
26 self.extra_rdoc_files << self.readme_file << 'ext/pk11.c'
dce3a0c Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION
Kanis-Küche authored
27 spec_extras[:extensions] = 'ext/extconf.rb'
7b35d4b Add parser for PKCS#11 structs and generator for Ruby wrapper classes
Lars Kanis authored
28 spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/)
7f3cf8c Lars Kanis renamed autogenerated files from *.c to *.inc to avoid problems with ext...
authored
29 spec_extras[:files] << 'ext/pk11_struct_impl.inc'
30 spec_extras[:files] << 'ext/pk11_struct_def.inc'
16cf225 Lars Kanis Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
authored
31 spec_extras[:files] << 'ext/pk11_const_def.inc'
32 spec_extras[:files] << 'ext/pk11_thread_funcs.h'
33 spec_extras[:files] << 'ext/pk11_thread_funcs.c'
c5d3bca restructured to build rubygems-packages based on hoe and rake-compiler
Kanis-Küche authored
34 end
35
dce3a0c Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION
Kanis-Küche authored
36 ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
37
38 Rake::ExtensionTask.new('pkcs11_ext', hoe.spec) do |ext|
39 ext.ext_dir = 'ext'
c5d3bca restructured to build rubygems-packages based on hoe and rake-compiler
Kanis-Küche authored
40 ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
41 ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] # forces the Windows platform instead of the default one
42 end
43
16cf225 Lars Kanis Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
authored
44 file 'ext/extconf.rb' => ['ext/pk11_struct_def.inc', 'ext/pk11_thread_funcs.c']
7f3cf8c Lars Kanis renamed autogenerated files from *.c to *.inc to avoid problems with ext...
authored
45 file 'ext/pk11_struct_def.inc' => 'ext/generate_structs.rb' do
46 sh "ruby ext/generate_structs.rb --def ext/pk11_struct_def.inc --impl ext/pk11_struct_impl.inc --const ext/pk11_const_def.inc ext/include/pkcs11t.h"
7b35d4b Add parser for PKCS#11 structs and generator for Ruby wrapper classes
Lars Kanis authored
47 end
7f3cf8c Lars Kanis renamed autogenerated files from *.c to *.inc to avoid problems with ext...
authored
48 file 'ext/pk11_struct_impl.inc' => 'ext/pk11_struct_def.inc'
49 file 'ext/pk11.c' => 'ext/pk11_struct_def.inc'
50 file 'ext/pk11_const.c' => 'ext/pk11_struct_def.inc'
7b35d4b Add parser for PKCS#11 structs and generator for Ruby wrapper classes
Lars Kanis authored
51
16cf225 Lars Kanis Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
authored
52 file 'ext/pk11_thread_funcs.h' => 'ext/generate_thread_funcs.rb' do
53 sh "ruby ext/generate_thread_funcs.rb --impl ext/pk11_thread_funcs.c --decl ext/pk11_thread_funcs.h ext/include/pkcs11f.h"
54 end
55 file 'ext/pk11_thread_funcs.c' => 'ext/pk11_thread_funcs.h'
56 file 'ext/pk11.h' => 'ext/pk11_thread_funcs.h'
57
f9b98d0 Lars Kanis deactivated github upload
authored
58 # RDoc-upload task for github (currently on rubyforge)
59 #
60 # require 'grancher/task'
61 # Grancher::Task.new do |g|
62 # g.branch = 'gh-pages' # alternatively, g.refspec = 'ghpages:/refs/heads/ghpages'
63 # g.push_to = 'origin'
64 # g.directory 'doc'
65 # end
cb0cde7 add grancher task for publishing rdoc to github
Kanis-Küche authored
66
c5d3bca restructured to build rubygems-packages based on hoe and rake-compiler
Kanis-Küche authored
67 # vim: syntax=ruby
Something went wrong with that request. Please try again.