yugui-chkbuild 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.ja.rd +191 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/bin/last-build +28 -0
- data/bin/start-build +37 -0
- data/chkbuild.gemspec +107 -0
- data/core_ext/io.rb +17 -0
- data/core_ext/string.rb +10 -0
- data/lib/chkbuild.rb +45 -0
- data/lib/chkbuild/build.rb +718 -0
- data/lib/chkbuild/lock.rb +57 -0
- data/lib/chkbuild/logfile.rb +230 -0
- data/lib/chkbuild/main.rb +138 -0
- data/lib/chkbuild/options.rb +62 -0
- data/lib/chkbuild/scm/cvs.rb +132 -0
- data/lib/chkbuild/scm/git.rb +223 -0
- data/lib/chkbuild/scm/svn.rb +215 -0
- data/lib/chkbuild/scm/xforge.rb +33 -0
- data/lib/chkbuild/target.rb +180 -0
- data/lib/chkbuild/targets/gcc.rb +94 -0
- data/lib/chkbuild/targets/ruby.rb +456 -0
- data/lib/chkbuild/title.rb +107 -0
- data/lib/chkbuild/upload.rb +66 -0
- data/lib/misc/escape.rb +535 -0
- data/lib/misc/gdb.rb +74 -0
- data/lib/misc/timeoutcom.rb +174 -0
- data/lib/misc/udiff.rb +244 -0
- data/lib/misc/util.rb +232 -0
- data/sample/build-autoconf-ruby +69 -0
- data/sample/build-gcc-ruby +43 -0
- data/sample/build-ruby +37 -0
- data/sample/build-ruby2 +36 -0
- data/sample/build-svn +55 -0
- data/sample/build-yarv +35 -0
- data/sample/test-apr +12 -0
- data/sample/test-catcherr +23 -0
- data/sample/test-combfail +21 -0
- data/sample/test-core +14 -0
- data/sample/test-core2 +19 -0
- data/sample/test-date +9 -0
- data/sample/test-dep +17 -0
- data/sample/test-depver +14 -0
- data/sample/test-echo +9 -0
- data/sample/test-env +9 -0
- data/sample/test-error +9 -0
- data/sample/test-fail +18 -0
- data/sample/test-fmesg +16 -0
- data/sample/test-gcc-v +15 -0
- data/sample/test-git +11 -0
- data/sample/test-leave-proc +9 -0
- data/sample/test-limit +9 -0
- data/sample/test-make +9 -0
- data/sample/test-neterr +16 -0
- data/sample/test-savannah +14 -0
- data/sample/test-sleep +9 -0
- data/sample/test-timeout +9 -0
- data/sample/test-timeout2 +10 -0
- data/sample/test-timeout3 +9 -0
- data/sample/test-upload +13 -0
- data/sample/test-warn +13 -0
- data/setup/upload-rsync-ssh +572 -0
- data/test/misc/test-escape.rb +17 -0
- data/test/misc/test-logfile.rb +108 -0
- data/test/misc/test-timeoutcom.rb +23 -0
- data/test/test_helper.rb +9 -0
- metadata +123 -0
data/lib/misc/util.rb
ADDED
@@ -0,0 +1,232 @@
|
|
1
|
+
# Copyright (C) 2006,2007,2009 Tanaka Akira <akr@fsij.org>
|
2
|
+
#
|
3
|
+
# Redistribution and use in source and binary forms, with or without
|
4
|
+
# modification, are permitted provided that the following conditions are met:
|
5
|
+
#
|
6
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
7
|
+
# list of conditions and the following disclaimer.
|
8
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
9
|
+
# this list of conditions and the following disclaimer in the documentation
|
10
|
+
# and/or other materials provided with the distribution.
|
11
|
+
# 3. The name of the author may not be used to endorse or promote products
|
12
|
+
# derived from this software without specific prior written permission.
|
13
|
+
#
|
14
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
15
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
16
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
17
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
18
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
19
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
20
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
21
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
22
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
23
|
+
# OF SUCH DAMAGE.
|
24
|
+
|
25
|
+
require 'fileutils'
|
26
|
+
require 'socket'
|
27
|
+
require "etc"
|
28
|
+
require "digest/sha2"
|
29
|
+
require "fcntl"
|
30
|
+
require "tempfile"
|
31
|
+
|
32
|
+
def tp(obj)
|
33
|
+
open("/dev/tty", "w") {|f| f.puts obj.inspect }
|
34
|
+
end
|
35
|
+
|
36
|
+
def tpp(obj)
|
37
|
+
require 'pp'
|
38
|
+
open("/dev/tty", "w") {|f| PP.pp(obj, f) }
|
39
|
+
end
|
40
|
+
|
41
|
+
module Kernel
|
42
|
+
if !nil.respond_to?(:funcall)
|
43
|
+
if nil.respond_to?(:fcall)
|
44
|
+
alias funcall fcall
|
45
|
+
else
|
46
|
+
alias funcall send
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
unless File.respond_to? :identical?
|
52
|
+
def File.identical?(filename1, filename2)
|
53
|
+
test(?-, filename1, filename2)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
class IO
|
58
|
+
def close_on_exec
|
59
|
+
self.fcntl(Fcntl::F_GETFD) & Fcntl::FD_CLOEXEC != 0
|
60
|
+
end
|
61
|
+
|
62
|
+
def close_on_exec=(v)
|
63
|
+
flags = self.fcntl(Fcntl::F_GETFD)
|
64
|
+
if v
|
65
|
+
flags |= Fcntl::FD_CLOEXEC
|
66
|
+
else
|
67
|
+
flags &= ~Fcntl::FD_CLOEXEC
|
68
|
+
end
|
69
|
+
self.fcntl(Fcntl::F_SETFD, flags)
|
70
|
+
v
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class Tempfile
|
75
|
+
def gather_each(arg)
|
76
|
+
if Regexp === arg
|
77
|
+
regexp = arg
|
78
|
+
arg = lambda {|e| regexp =~ e; $& }
|
79
|
+
end
|
80
|
+
prev_value = prev_elts = nil
|
81
|
+
self.each {|e|
|
82
|
+
v = arg.call(e)
|
83
|
+
if prev_value == nil
|
84
|
+
if v == nil
|
85
|
+
yield [e]
|
86
|
+
else
|
87
|
+
prev_value = v
|
88
|
+
prev_elts = [e]
|
89
|
+
end
|
90
|
+
else
|
91
|
+
if v == nil
|
92
|
+
yield prev_elts
|
93
|
+
yield [e]
|
94
|
+
prev_value = prev_elts = nil
|
95
|
+
elsif prev_value == v
|
96
|
+
prev_elts << e
|
97
|
+
else
|
98
|
+
yield prev_elts
|
99
|
+
prev_value = v
|
100
|
+
prev_elts = [e]
|
101
|
+
end
|
102
|
+
end
|
103
|
+
}
|
104
|
+
if prev_value != nil
|
105
|
+
yield prev_elts
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
module Util
|
111
|
+
extend Util # similar to module_function but instance methods are public.
|
112
|
+
|
113
|
+
# Util.rproduct(ary1, ary2, ...)
|
114
|
+
#
|
115
|
+
# Util.rproduct([1,2],[3,4]) #=> [[1, 3], [2, 3], [1, 4], [2, 4]]
|
116
|
+
def rproduct(*args)
|
117
|
+
if block_given?
|
118
|
+
product_each(*args.reverse) {|vs| yield vs.reverse }
|
119
|
+
else
|
120
|
+
r = []
|
121
|
+
product_each(*args.reverse) {|vs| r << vs.reverse }
|
122
|
+
r
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
def product(*args)
|
127
|
+
if block_given?
|
128
|
+
product_each(*args) {|vs| yield vs }
|
129
|
+
else
|
130
|
+
r = []
|
131
|
+
product_each(*args) {|vs| r << vs }
|
132
|
+
r
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def product_each(*args)
|
137
|
+
if args.empty?
|
138
|
+
yield []
|
139
|
+
else
|
140
|
+
arg, *rest = args
|
141
|
+
arg.each {|v|
|
142
|
+
product_each(*rest) {|vs|
|
143
|
+
yield [v, *vs]
|
144
|
+
}
|
145
|
+
}
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def mkcd(dir)
|
150
|
+
FileUtils.mkpath dir
|
151
|
+
Dir.chdir dir
|
152
|
+
end
|
153
|
+
|
154
|
+
def resource_unlimit(resource)
|
155
|
+
if Symbol === resource
|
156
|
+
begin
|
157
|
+
resource = Process.const_get(resource)
|
158
|
+
rescue NameError
|
159
|
+
return
|
160
|
+
end
|
161
|
+
end
|
162
|
+
cur_limit, max_limit = Process.getrlimit(resource)
|
163
|
+
Process.setrlimit(resource, max_limit, max_limit)
|
164
|
+
end
|
165
|
+
|
166
|
+
def resource_limit(resource, val)
|
167
|
+
if Symbol === resource
|
168
|
+
begin
|
169
|
+
resource = Process.const_get(resource)
|
170
|
+
rescue NameError
|
171
|
+
return
|
172
|
+
end
|
173
|
+
end
|
174
|
+
cur_limit, max_limit = Process.getrlimit(resource)
|
175
|
+
if max_limit < val
|
176
|
+
val = max_limit
|
177
|
+
end
|
178
|
+
Process.setrlimit(resource, val, val)
|
179
|
+
end
|
180
|
+
|
181
|
+
def sha256_digest_file(filename)
|
182
|
+
d = Digest::SHA256.new
|
183
|
+
open(filename) {|f|
|
184
|
+
buf = ""
|
185
|
+
while f.read(4096, buf)
|
186
|
+
d << buf
|
187
|
+
end
|
188
|
+
}
|
189
|
+
"sha256:#{d.hexdigest}"
|
190
|
+
end
|
191
|
+
|
192
|
+
def force_link(old, new)
|
193
|
+
i = 0
|
194
|
+
tmp = new
|
195
|
+
begin
|
196
|
+
File.link old, tmp
|
197
|
+
rescue Errno::EEXIST
|
198
|
+
i += 1
|
199
|
+
tmp = "#{new}.tmp#{i}"
|
200
|
+
retry
|
201
|
+
end
|
202
|
+
if tmp != new
|
203
|
+
File.rename tmp, new
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
def atomic_make_file(filename, content)
|
208
|
+
tmp = nil
|
209
|
+
i = 0
|
210
|
+
begin
|
211
|
+
tmp = "#{filename}.tmp#{i}"
|
212
|
+
f = File.open(tmp, File::WRONLY|File::CREAT|File::TRUNC|File::EXCL)
|
213
|
+
rescue Errno::EEXIST
|
214
|
+
i += 1
|
215
|
+
retry
|
216
|
+
end
|
217
|
+
f << content
|
218
|
+
f.close
|
219
|
+
File.rename tmp, filename
|
220
|
+
end
|
221
|
+
|
222
|
+
def with_tempfile(content) # :yield: tempfile
|
223
|
+
t = Tempfile.new("chkbuild")
|
224
|
+
t << content
|
225
|
+
t.sync
|
226
|
+
yield t
|
227
|
+
end
|
228
|
+
|
229
|
+
def simple_hostname
|
230
|
+
Socket.gethostname.sub(/\..*/, '')
|
231
|
+
end
|
232
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (C) 2005,2006,2007,2009 Tanaka Akira <akr@fsij.org>
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
10
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
# 3. The name of the author may not be used to endorse or promote products
|
14
|
+
# derived from this software without specific prior written permission.
|
15
|
+
#
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
+
# OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'chkbuild'
|
28
|
+
|
29
|
+
ChkBuild.limit(:data=>1024*1024*800, :as=>1024*1024*800)
|
30
|
+
|
31
|
+
def modify_file(filename)
|
32
|
+
content = yield File.read(filename)
|
33
|
+
open(filename, "w") {|f|
|
34
|
+
f.print content
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
Autoconf = ChkBuild.def_target("autoconf") {|b|
|
39
|
+
dir = b.build_dir
|
40
|
+
Dir.chdir("..") {
|
41
|
+
b.gnu_savannah_cvs('autoconf', 'autoconf', nil)
|
42
|
+
}
|
43
|
+
b.mkcd("objdir")
|
44
|
+
b.run("../../autoconf/configure", "--prefix=#{dir}")
|
45
|
+
# modify Makefile to not use help2man.
|
46
|
+
modify_file("Makefile") {|content|
|
47
|
+
content.sub(/^SUBDIRS\s*=.*$/) { $&.sub(/ man /, ' ') }
|
48
|
+
}
|
49
|
+
b.make
|
50
|
+
b.make("install")
|
51
|
+
|
52
|
+
b.run("#{dir}/bin/autoconf", '--version', :section=>'version')
|
53
|
+
}
|
54
|
+
|
55
|
+
Autoconf.add_title_hook('version') {|title, log|
|
56
|
+
case log
|
57
|
+
when /^Autoconf version (.*)$/
|
58
|
+
title.update_title(:version, "autoconf #{$1}")
|
59
|
+
when /^autoconf \(GNU Autoconf\) (.*)$/
|
60
|
+
title.update_title(:version, "autoconf #{$1}")
|
61
|
+
end
|
62
|
+
}
|
63
|
+
|
64
|
+
ChkBuild::Ruby.def_target(
|
65
|
+
ChkBuild::Ruby::MaintainedBranches,
|
66
|
+
Autoconf,
|
67
|
+
:separated_srcdir => true)
|
68
|
+
|
69
|
+
ChkBuild.main
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (C) 2005,2006,2007,2009 Tanaka Akira <akr@fsij.org>
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
10
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
# 3. The name of the author may not be used to endorse or promote products
|
14
|
+
# derived from this software without specific prior written permission.
|
15
|
+
#
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
+
# OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'chkbuild'
|
28
|
+
|
29
|
+
ChkBuild.limit(:data=>1024*1024*800, :as=>1024*1024*800)
|
30
|
+
|
31
|
+
gcc = ChkBuild::GCC.def_target(
|
32
|
+
["trunk", "4.2", "4.1", "4.0"],
|
33
|
+
:old => 1)
|
34
|
+
|
35
|
+
ChkBuild::Ruby.def_target(
|
36
|
+
ChkBuild::Ruby::MaintainedBranches,
|
37
|
+
["o0", "o1", nil, "o3"],
|
38
|
+
[nil, "pth"],
|
39
|
+
gcc,
|
40
|
+
:old => 1,
|
41
|
+
:separated_srcdir => true)
|
42
|
+
|
43
|
+
ChkBuild.main
|
data/sample/build-ruby
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (C) 2005,2006,2007,2009 Tanaka Akira <akr@fsij.org>
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
10
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
# 3. The name of the author may not be used to endorse or promote products
|
14
|
+
# derived from this software without specific prior written permission.
|
15
|
+
#
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
+
# OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'chkbuild'
|
28
|
+
|
29
|
+
ChkBuild.limit(:data=>1024*1024*800, :as=>1024*1024*800)
|
30
|
+
|
31
|
+
ChkBuild::Ruby.def_target(
|
32
|
+
ChkBuild::Ruby::MaintainedBranches, # 'trunk',
|
33
|
+
# ['m32', 'm64'],
|
34
|
+
[nil, "pth"],
|
35
|
+
:old => 1)
|
36
|
+
|
37
|
+
ChkBuild.main
|
data/sample/build-ruby2
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (C) 2005,2006,2007,2009 Tanaka Akira <akr@fsij.org>
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
10
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
# 3. The name of the author may not be used to endorse or promote products
|
14
|
+
# derived from this software without specific prior written permission.
|
15
|
+
#
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
+
# OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'chkbuild'
|
28
|
+
|
29
|
+
ChkBuild.limit(:data=>1024*1024*800, :as=>1024*1024*800)
|
30
|
+
|
31
|
+
ChkBuild::Ruby.def_target(
|
32
|
+
ChkBuild::Ruby::MaintainedBranches,
|
33
|
+
[nil, "pth"],
|
34
|
+
:separated_srcdir => true)
|
35
|
+
|
36
|
+
ChkBuild.main
|
data/sample/build-svn
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Copyright (C) 2006,2009 Tanaka Akira <akr@fsij.org>
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
10
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
# 3. The name of the author may not be used to endorse or promote products
|
14
|
+
# derived from this software without specific prior written permission.
|
15
|
+
#
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
17
|
+
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
18
|
+
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
19
|
+
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
20
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
21
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
22
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
23
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
25
|
+
# OF SUCH DAMAGE.
|
26
|
+
|
27
|
+
require 'chkbuild'
|
28
|
+
|
29
|
+
ChkBuild.limit(:data=>1024*1024*800, :as=>1024*1024*800)
|
30
|
+
|
31
|
+
svn = ChkBuild.def_target("svn") {|b|
|
32
|
+
dir = b.build_dir
|
33
|
+
b.svn('http://svn.collab.net/repos/svn', 'trunk', 'subversion',
|
34
|
+
:viewvc=>"http://svn.collab.net/viewvc/svn?diff_format=u")
|
35
|
+
Dir.chdir("subversion") {
|
36
|
+
b.run("./autogen.sh")
|
37
|
+
b.run("./configure", "--prefix=#{dir}")
|
38
|
+
b.make
|
39
|
+
b.run("subversion/svn/svn", "--version", :section=>'version', "ENV:LC_ALL"=>"C")
|
40
|
+
b.run("subversion/svn/svn", "help", :section=>'help')
|
41
|
+
b.make("install")
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
svn.add_title_hook('help') {|title, log|
|
46
|
+
if /^Subversion command-line client, version (.*)\.$/ =~ log
|
47
|
+
title.update_title(:version, "Subversion #{$1}")
|
48
|
+
end
|
49
|
+
}
|
50
|
+
|
51
|
+
svn.add_diff_preprocess_gsub(/^ compiled .*, \d\d:\d\d:\d\d$/) {
|
52
|
+
' compiled <time>'
|
53
|
+
}
|
54
|
+
|
55
|
+
ChkBuild.main
|