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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
$NetBSD: patch-aa,v 1.2 2007/06/09 00:48:43 minskim Exp $
--- Rakefile.orig 2007-04-03 14:26:53.000000000 -0700
+++ Rakefile
@@ -1,13 +1,12 @@
require 'rake'
require 'rake/clean'
-require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
require 'fileutils'
include FileUtils
NAME = "hpricot"
-REV = `svn info`[/Revision: (\d+)/, 1] rescue nil
+REV = "140"
VERS = ENV['VERSION'] || "0.5" + (REV ? ".#{REV}" : "")
PKG = "#{NAME}-#{VERS}"
BIN = "*.{bundle,jar,so,obj,pdb,lib,def,exp}"
@@ -18,24 +17,6 @@ PKG_FILES = %w(CHANGELOG COPYING README
Dir.glob("{bin,doc,test,lib,extras}/**/*") +
Dir.glob("ext/**/*.{h,java,c,rb,rl}") +
%w[ext/hpricot_scan/hpricot_scan.c] # needed because it's generated later
-SPEC =
- Gem::Specification.new do |s|
- s.name = NAME
- s.version = VERS
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.rdoc_options += RDOC_OPTS
- s.extra_rdoc_files = ["README", "CHANGELOG", "COPYING"]
- s.summary = "a swift, liberal HTML parser with a fantastic library"
- s.description = s.summary
- s.author = "why the lucky stiff"
- s.email = 'why@ruby-lang.org'
- s.homepage = 'http://code.whytheluckystiff.net/hpricot/'
- s.files = PKG_FILES
- s.require_path = "lib"
- s.extensions = FileList["ext/**/extconf.rb"].to_a
- s.bindir = "bin"
- end
desc "Does a full compile, test run"
task :default => [:compile, :test]
@@ -60,11 +41,6 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.add ['README', 'CHANGELOG', 'COPYING', 'lib/**/*.rb']
end
-Rake::GemPackageTask.new(SPEC) do |p|
- p.need_tar = true
- p.gem_spec = SPEC
-end
-
extension = "hpricot_scan"
ext = "ext/hpricot_scan"
ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}"
@@ -124,11 +100,6 @@ end
### Win32 Packages ###
-Win32Spec = SPEC.dup
-Win32Spec.platform = Gem::Platform::WIN32
-Win32Spec.files = PKG_FILES + ['lib/hpricot_scan.so']
-Win32Spec.extensions = []
-
WIN32_PKG_DIR = "#{PKG}-mswin32"
desc "Package up the Win32 distribution."
@@ -168,11 +139,6 @@ task :hpricot_scan_java => [:ragel_java]
Dir.chdir("ext/hpricot_scan", &compile_java)
end
-JRubySpec = SPEC.dup
-JRubySpec.platform = 'jruby'
-JRubySpec.files = PKG_FILES + ['lib/hpricot_scan.jar']
-JRubySpec.extensions = []
-
JRUBY_PKG_DIR = "#{PKG}-jruby"
desc "Package up the JRuby distribution."
|