-
Notifications
You must be signed in to change notification settings - Fork 18
/
Rakefile.rb
executable file
·60 lines (48 loc) · 1.86 KB
/
Rakefile.rb
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# encoding: UTF-8
require 'rubygems'
require 'rdoc/task'
require 'rake/testtask'
require 'rubygems/package_task'
spec = Gem::Specification.new do |s|
s.name = "origami"
s.version = "1.2.5"
s.author = "Guillaume Delugre"
s.email = "guillaume at security-labs dot org"
s.homepage = "http://code.google.com/p/origami-pdf"
s.platform = Gem::Platform::RUBY
s.summary = "Origami aims at providing a scripting tool to generate and analyze malicious PDF files."
s.description = <<DESC
Origami is a PDF-compliant parser. This is not a PDF rendering library, it aims at providing a scripting tool to generate and analyze malicious PDF files.
As well, it can be used to create on-the-fly customized PDFs, or to inject (evil) code into already existing documents.
DESC
s.files = FileList[
'README', 'COPYING.LESSER', "{lib,bin,tests,samples,templates}/**/*", "bin/shell/.irbrc"
].exclude(/\.pdf$/, /\.key$/, /\.crt$/, /\.conf$/).to_a
s.require_path = "lib"
s.has_rdoc = true
s.test_file = "test/ts_pdf.rb"
s.requirements = "ruby-gtk2 if you plan to run the PDF Walker interface"
s.bindir = "bin"
s.executables = [ "pdfdecompress", "pdfdecrypt", "pdfencrypt", "pdfmetadata", "pdf2graph", "pdf2ruby", "pdfextract", "pdfcop", "pdfcocoon", "pdfsh", "pdfwalker", "pdf2pdfa" ]
end
task :default => [:package]
Gem::PackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
desc "Generate rdoc documentation"
Rake::RDocTask.new("rdoc") do |rdoc|
rdoc.rdoc_dir = "doc"
rdoc.title = "Origami"
rdoc.options << "-U" << "-N"
rdoc.options << "-m" << "Origami::PDF"
rdoc.rdoc_files.include("lib/origami/**/*.rb")
end
desc "Run the test suite"
Rake::TestTask.new do |t|
t.verbose = true
t.libs << "test"
t.test_files = FileList["test/ts_pdf.rb"]
end
task :clean do
%x{rm -rf pkg doc}
end