Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 100 lines (83 sloc) 3.788 kb
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
1 # -*- coding: utf-8 -*-
2 # -*- ruby -*-
3
4 require 'rubygems'
5 require 'hoe'
6 require 'rake/extensiontask'
33a3bf30 »
2010-12-19 use rbconfig for calling ruby executable
7 require 'rbconfig'
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
8
f9ceba6d »
2011-04-29 remove duplicated list of generated files
9 GENERATED_FILES = [
10 'ext/pk11_struct_impl.inc',
11 'ext/pk11_struct_def.inc',
12 'ext/pk11_const_def.inc',
13 'ext/pk11_struct.doc',
14 'ext/pk11_thread_funcs.h',
15 'ext/pk11_thread_funcs.c',
16 ]
17
18 CLEAN.include GENERATED_FILES
7b35d4b2 »
2010-09-19 Add parser for PKCS#11 structs and generator for Ruby wrapper classes
19 CLEAN.include 'lib/pkcs11_ext.so'
7f3cf8cd »
2010-09-27 renamed autogenerated files from *.c to *.inc to avoid problems with …
20 CLEAN.include 'tmp'
7b35d4b2 »
2010-09-19 Add parser for PKCS#11 structs and generator for Ruby wrapper classes
21
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
22 hoe = Hoe.spec 'pkcs11' do
23 developer('Ryosuke Kutsuna', 'ryosuke@deer-n-horse.jp')
24 developer('GOTOU Yuuzou', 'gotoyuzo@notwork.org')
25 developer('Lars Kanis', 'kanis@comcard.de')
be740f64 »
2010-11-06 add development dependency gems
26 extra_dev_deps << ['yard', '>= 0.6']
27 extra_dev_deps << ['rake-compiler', '>= 0.7']
3b8c8375 »
2011-01-07 always use different extension dirs for ruby 1.8 and 1.9
28
12b7ed0f »
2010-05-27 Add project homepage to Rakefile, because it's misinterpretet from RE…
29 self.url = 'http://github.com/larskanis/pkcs11'
dca40ba9 »
2010-05-27 Add summary and description to Rakefile - were missing for the 0.1.0 …
30 self.summary = 'PKCS#11 binding for Ruby'
31 self.description = 'This module allows Ruby programs to interface with "RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki)".'
32
9713aa5a »
2010-05-04 Updated README file
33 self.readme_file = 'README.rdoc'
e15e8e8e »
2010-05-27 include pk11.c into rdoc to get PKCS.open documented
34 self.extra_rdoc_files << self.readme_file << 'ext/pk11.c'
dce3a0c4 »
2010-05-04 Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION
35 spec_extras[:extensions] = 'ext/extconf.rb'
b30fa692 »
2011-08-12 Ignore files stating with "pkcs11_". They belong to seperated package…
36 spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/).reject{|f| f=~/^pkcs11_/ }
f9ceba6d »
2011-04-29 remove duplicated list of generated files
37 spec_extras[:files] += GENERATED_FILES
263496e2 »
2011-01-08 add generating and publish task for yardoc, mark gem as yard-based
38 spec_extras[:has_rdoc] = 'yard'
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
39 end
40
1532a560 »
2011-08-13 use Ruby 1.8.7 per default for win32 cross compilation
41 ENV['RUBY_CC_VERSION'] ||= '1.8.7:1.9.2'
dce3a0c4 »
2010-05-04 Adding "fat gem" compatible loader, set the default RUBY_CC_VERSION
42
43 Rake::ExtensionTask.new('pkcs11_ext', hoe.spec) do |ext|
44 ext.ext_dir = 'ext'
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
45 ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
28db7c64 »
2011-12-12 remove cross_platform target i386-mswin32, since it isn't in wide use…
46 ext.cross_platform = ['i386-mingw32'] # forces the Windows platform instead of the default one
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
47 end
48
16cf2259 »
2010-10-08 Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
49 file 'ext/extconf.rb' => ['ext/pk11_struct_def.inc', 'ext/pk11_thread_funcs.c']
7f3cf8cd »
2010-09-27 renamed autogenerated files from *.c to *.inc to avoid problems with …
50 file 'ext/pk11_struct_def.inc' => 'ext/generate_structs.rb' do
9f535f5a »
2011-12-12 replace deprecated Config in favor of RbConfig
51 sh "#{RbConfig::CONFIG['ruby_install_name']} ext/generate_structs.rb --def ext/pk11_struct_def.inc --impl ext/pk11_struct_impl.inc --doc ext/pk11_struct.doc ext/include/pkcs11t.h"
7b35d4b2 »
2010-09-19 Add parser for PKCS#11 structs and generator for Ruby wrapper classes
52 end
7f3cf8cd »
2010-09-27 renamed autogenerated files from *.c to *.inc to avoid problems with …
53 file 'ext/pk11_struct_impl.inc' => 'ext/pk11_struct_def.inc'
e5e89954 »
2011-08-12 renamed PKCS11::Safenet to PKCS11::ProtectServer - Safenet has two pr…
54 file 'ext/pk11_struct.doc' => 'ext/pk11_struct_def.inc'
55
ca666a25 »
2011-03-03 refactured code generation for PKCS#11 structs and constants
56 file 'ext/pk11_const_def.inc' => 'ext/generate_constants.rb' do
9f535f5a »
2011-12-12 replace deprecated Config in favor of RbConfig
57 sh "#{RbConfig::CONFIG['ruby_install_name']} ext/generate_constants.rb --const ext/pk11_const_def.inc ext/include/pkcs11t.h"
ca666a25 »
2011-03-03 refactured code generation for PKCS#11 structs and constants
58 end
818adb9d »
2011-03-10 refacturing of C code to better allow vendor specific PKCS11-extensions
59 file 'ext/pk11.c' => ['ext/pk11_struct_def.inc', 'ext/pk11_struct_impl.inc', 'ext/pk11_struct_macros.h']
60 file 'ext/pk11_const.c' => ['ext/pk11_const_def.inc', 'ext/pk11_const_macros.h']
7b35d4b2 »
2010-09-19 Add parser for PKCS#11 structs and generator for Ruby wrapper classes
61
16cf2259 »
2010-10-08 Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
62 file 'ext/pk11_thread_funcs.h' => 'ext/generate_thread_funcs.rb' do
9f535f5a »
2011-12-12 replace deprecated Config in favor of RbConfig
63 sh "#{RbConfig::CONFIG['ruby_install_name']} ext/generate_thread_funcs.rb --impl ext/pk11_thread_funcs.c --decl ext/pk11_thread_funcs.h ext/include/pkcs11f.h"
16cf2259 »
2010-10-08 Wrap all PKCS#11 calls by rb_thread_blocking_region() for Ruby 1.9.
64 end
65 file 'ext/pk11_thread_funcs.c' => 'ext/pk11_thread_funcs.h'
66 file 'ext/pk11.h' => 'ext/pk11_thread_funcs.h'
67
9630e9cd »
2011-12-12 add generation of *.doc files as yardoc dependency, use namespace pkc…
68 task :docs_of_vendor_extensions do
69 Dir['pkcs11_*'].each do |dir|
70 chdir(dir) do
4dd4c835 »
2011-12-12 rename Rakefile namespace pkcs11_protect_server to protect_server
71 sh "rake #{dir.sub(/^pkcs11_/,'')}:doc_files"
9630e9cd »
2011-12-12 add generation of *.doc files as yardoc dependency, use namespace pkc…
72 end
73 end
74 end
75
263496e2 »
2011-01-08 add generating and publish task for yardoc, mark gem as yard-based
76 desc "Generate static HTML documentation with YARD"
9630e9cd »
2011-12-12 add generation of *.doc files as yardoc dependency, use namespace pkc…
77 task :yardoc=>['ext/pk11_struct.doc', :docs_of_vendor_extensions] do
fe5410e8 »
2011-08-12 add a paragraph for vendor specific extensions
78 sh "yardoc --title \"PKCS#11/Ruby Interface\" --no-private lib/**/*.rb ext/*.c ext/*.doc pkcs11_protect_server/lib/**/*.rb pkcs11_protect_server/ext/*.c pkcs11_protect_server/ext/*.doc - pkcs11_protect_server/README_PROTECT_SERVER.rdoc"
263496e2 »
2011-01-08 add generating and publish task for yardoc, mark gem as yard-based
79 end
80
81 desc "Publish YARD to wherever you want."
82 task :publish_yard => [:yardoc] do
83 rdoc_locations = hoe.rdoc_locations
84 warn "no rdoc_location values" if rdoc_locations.empty?
85 rdoc_locations.each do |dest|
86 sh %{rsync -av --delete doc/ #{dest}}
87 end
88 end
89
f9b98d00 »
2010-05-10 deactivated github upload
90 # RDoc-upload task for github (currently on rubyforge)
91 #
92 # require 'grancher/task'
93 # Grancher::Task.new do |g|
94 # g.branch = 'gh-pages' # alternatively, g.refspec = 'ghpages:/refs/heads/ghpages'
95 # g.push_to = 'origin'
96 # g.directory 'doc'
97 # end
cb0cde7a »
2010-05-09 add grancher task for publishing rdoc to github
98
c5d3bca6 »
2010-05-03 restructured to build rubygems-packages based on hoe and rake-compiler
99 # vim: syntax=ruby
Something went wrong with that request. Please try again.