reap 5.0.0 → 5.10.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/ANN +3 -0
  2. data/COPYING +11 -0
  3. data/ChangeLog +25 -0
  4. data/ProjectInfo +41 -66
  5. data/README +125 -0
  6. data/Rakefile +0 -10
  7. data/bin/reap +3 -4
  8. data/data/reap/scaffold/COPYING +11 -0
  9. data/data/reap/scaffold/{standard/ChangeLog → ChangeLog} +0 -0
  10. data/data/reap/scaffold/{standard/TODO → INSTALL} +0 -0
  11. data/data/reap/scaffold/{standard/ProjectInfo → ProjectInfo} +20 -20
  12. data/data/reap/scaffold/{subversion/trunk/ChangeLog → README} +0 -0
  13. data/data/reap/scaffold/Rakefile +146 -0
  14. data/data/reap/scaffold/{subversion/trunk/TODO → Todo} +0 -0
  15. data/{doc/note → data/reap/scaffold}/setup.rb +11 -18
  16. data/{doc/note/aRakefile → dev/Rakefile} +0 -0
  17. data/{doc/note → dev}/composite_task.rb +0 -0
  18. data/{doc/note → dev}/compositepublisher.rb +0 -0
  19. data/{doc/note → dev}/ftptools.rb +0 -0
  20. data/{doc/note → dev}/license-each.rb +0 -0
  21. data/{doc/note → dev}/publisher.rb +0 -0
  22. data/{doc/note → dev}/rubyforgepublisher.rb +0 -0
  23. data/{doc/note → dev}/sshpublisher.rb +0 -0
  24. data/{doc/note → dev}/suby-cvs.rb +0 -0
  25. data/{doc/note → dev}/template.rb +0 -0
  26. data/lib/reap/bin/reap.rb +67 -84
  27. data/{doc/note/interface/interface.rb → lib/reap/lint.rb} +0 -0
  28. data/lib/reap/projectinfo.rb +28 -206
  29. data/lib/reap/readymade.rb +21 -0
  30. data/lib/reap/task.rb +118 -184
  31. data/lib/reap/task/announce.rb +93 -181
  32. data/lib/reap/task/fileperm.rb +16 -46
  33. data/lib/reap/task/info.rb +7 -33
  34. data/lib/reap/task/install.rb +17 -52
  35. data/{task → lib/reap/task}/noop.rb +9 -4
  36. data/lib/reap/task/package.rb +102 -348
  37. data/lib/reap/task/publish.rb +29 -155
  38. data/lib/reap/task/rdoc.rb +40 -92
  39. data/lib/reap/task/scaffold.rb +98 -41
  40. data/lib/reap/task/test.rb +52 -147
  41. data/lib/reap/task/testext.rb +110 -0
  42. data/lib/reap/task/webpublish.rb +43 -0
  43. data/lib/reap/tasks.rb +13 -0
  44. data/lib/reap/test.rb +138 -0
  45. data/setup.rb +272 -287
  46. data/test/tc_reap.rb +1 -1
  47. data/web/ProjectInfo +57 -0
  48. data/web/images/appleboy.jpg +0 -0
  49. data/web/images/grape.jpg +0 -0
  50. data/web/index.html +124 -0
  51. data/web/rdoc/classes/Object.html +121 -0
  52. data/web/rdoc/classes/ProjectInfo.html +207 -0
  53. data/web/rdoc/classes/ProjectInfo.src/M000094.html +18 -0
  54. data/web/rdoc/classes/ProjectInfo.src/M000095.html +24 -0
  55. data/web/rdoc/classes/ProjectInfo.src/M000096.html +22 -0
  56. data/web/rdoc/classes/ProjectInfo.src/M000097.html +21 -0
  57. data/web/rdoc/classes/ProjectInfo.src/M000098.html +18 -0
  58. data/web/rdoc/classes/Reap.html +248 -0
  59. data/web/rdoc/classes/Reap.src/M000023.html +16 -0
  60. data/web/rdoc/classes/Reap.src/M000024.html +21 -0
  61. data/web/rdoc/classes/Reap.src/M000025.html +16 -0
  62. data/web/rdoc/classes/Reap.src/M000026.html +21 -0
  63. data/web/rdoc/classes/Reap/Announce.html +262 -0
  64. data/web/rdoc/classes/Reap/Announce.src/M000030.html +18 -0
  65. data/web/rdoc/classes/Reap/Announce.src/M000031.html +114 -0
  66. data/web/rdoc/classes/Reap/Announce.src/M000032.html +46 -0
  67. data/web/rdoc/classes/Reap/Info.html +176 -0
  68. data/web/rdoc/classes/Reap/Info.src/M000033.html +18 -0
  69. data/web/rdoc/classes/Reap/Info.src/M000034.html +17 -0
  70. data/web/rdoc/classes/Reap/Info.src/M000035.html +18 -0
  71. data/web/rdoc/classes/Reap/Install.html +193 -0
  72. data/web/rdoc/classes/Reap/Install.src/M000036.html +18 -0
  73. data/web/rdoc/classes/Reap/Install.src/M000037.html +20 -0
  74. data/web/rdoc/classes/Reap/Install.src/M000038.html +26 -0
  75. data/web/rdoc/classes/Reap/Noop.html +192 -0
  76. data/web/rdoc/classes/Reap/Noop.src/M000027.html +18 -0
  77. data/web/rdoc/classes/Reap/Noop.src/M000028.html +17 -0
  78. data/web/rdoc/classes/Reap/Noop.src/M000029.html +18 -0
  79. data/web/rdoc/classes/Reap/Package.html +310 -0
  80. data/web/rdoc/classes/Reap/Package.src/M000055.html +18 -0
  81. data/web/rdoc/classes/Reap/Package.src/M000056.html +68 -0
  82. data/web/rdoc/classes/Reap/Package.src/M000057.html +84 -0
  83. data/web/rdoc/classes/Reap/Package.src/M000058.html +61 -0
  84. data/web/rdoc/classes/Reap/Perm.html +236 -0
  85. data/web/rdoc/classes/Reap/Perm.src/M000078.html +18 -0
  86. data/web/rdoc/classes/Reap/Perm.src/M000079.html +21 -0
  87. data/web/rdoc/classes/Reap/Perm.src/M000080.html +42 -0
  88. data/web/rdoc/classes/Reap/Perm.src/M000081.html +26 -0
  89. data/web/rdoc/classes/Reap/Perm.src/M000082.html +18 -0
  90. data/web/rdoc/classes/Reap/Publish.html +213 -0
  91. data/web/rdoc/classes/Reap/Publish.src/M000070.html +18 -0
  92. data/web/rdoc/classes/Reap/Publish.src/M000071.html +22 -0
  93. data/web/rdoc/classes/Reap/Publish.src/M000072.html +37 -0
  94. data/web/rdoc/classes/Reap/RDoc.html +218 -0
  95. data/web/rdoc/classes/Reap/RDoc.src/M000059.html +18 -0
  96. data/web/rdoc/classes/Reap/RDoc.src/M000060.html +24 -0
  97. data/web/rdoc/classes/Reap/RDoc.src/M000061.html +70 -0
  98. data/web/rdoc/classes/Reap/Task.html +396 -0
  99. data/web/rdoc/classes/Reap/Task.src/M000039.html +18 -0
  100. data/web/rdoc/classes/Reap/Task.src/M000040.html +16 -0
  101. data/web/rdoc/classes/Reap/Task.src/M000041.html +16 -0
  102. data/web/rdoc/classes/Reap/Task.src/M000042.html +16 -0
  103. data/web/rdoc/classes/Reap/Task.src/M000043.html +16 -0
  104. data/web/rdoc/classes/Reap/Task.src/M000044.html +22 -0
  105. data/web/rdoc/classes/Reap/Task.src/M000045.html +16 -0
  106. data/web/rdoc/classes/Reap/Task.src/M000046.html +16 -0
  107. data/web/rdoc/classes/Reap/Task.src/M000047.html +16 -0
  108. data/web/rdoc/classes/Reap/Task.src/M000048.html +16 -0
  109. data/web/rdoc/classes/Reap/Task.src/M000049.html +16 -0
  110. data/web/rdoc/classes/Reap/Task.src/M000050.html +27 -0
  111. data/web/rdoc/classes/Reap/Task.src/M000051.html +19 -0
  112. data/web/rdoc/classes/Reap/Task.src/M000052.html +18 -0
  113. data/web/rdoc/classes/Reap/Task.src/M000053.html +18 -0
  114. data/web/rdoc/classes/Reap/Task.src/M000054.html +19 -0
  115. data/web/rdoc/classes/Reap/Test.html +253 -0
  116. data/web/rdoc/classes/Reap/Test.src/M000062.html +18 -0
  117. data/web/rdoc/classes/Reap/Test.src/M000063.html +26 -0
  118. data/web/rdoc/classes/Reap/Test.src/M000064.html +77 -0
  119. data/web/rdoc/classes/Reap/Test.src/M000065.html +27 -0
  120. data/web/rdoc/classes/Reap/Test.src/M000066.html +50 -0
  121. data/web/rdoc/classes/Reap/Test/TestResults.html +205 -0
  122. data/web/rdoc/classes/Reap/Test/TestResults.src/M000067.html +21 -0
  123. data/web/rdoc/classes/Reap/Test/TestResults.src/M000068.html +21 -0
  124. data/web/rdoc/classes/Reap/Test/TestResults.src/M000069.html +23 -0
  125. data/web/rdoc/classes/Reap/TestExt.html +234 -0
  126. data/web/rdoc/classes/Reap/TestExt.src/M000073.html +18 -0
  127. data/web/rdoc/classes/Reap/TestExt.src/M000074.html +20 -0
  128. data/web/rdoc/classes/Reap/TestExt.src/M000075.html +49 -0
  129. data/web/rdoc/classes/Reap/TestExt.src/M000076.html +34 -0
  130. data/web/rdoc/classes/Reap/TestExt.src/M000077.html +27 -0
  131. data/web/rdoc/classes/Reap/WebPublish.html +213 -0
  132. data/web/rdoc/classes/Reap/WebPublish.src/M000083.html +18 -0
  133. data/web/rdoc/classes/Reap/WebPublish.src/M000084.html +21 -0
  134. data/web/rdoc/classes/Reap/WebPublish.src/M000085.html +32 -0
  135. data/web/rdoc/classes/ReapCommand.html +425 -0
  136. data/web/rdoc/classes/ReapCommand.src/M000001.html +16 -0
  137. data/web/rdoc/classes/ReapCommand.src/M000003.html +16 -0
  138. data/web/rdoc/classes/ReapCommand.src/M000005.html +16 -0
  139. data/web/rdoc/classes/ReapCommand.src/M000007.html +16 -0
  140. data/web/rdoc/classes/ReapCommand.src/M000009.html +16 -0
  141. data/web/rdoc/classes/ReapCommand.src/M000011.html +16 -0
  142. data/web/rdoc/classes/ReapCommand.src/M000013.html +18 -0
  143. data/web/rdoc/classes/ReapCommand.src/M000014.html +19 -0
  144. data/web/rdoc/classes/ReapCommand.src/M000015.html +19 -0
  145. data/web/rdoc/classes/ReapCommand.src/M000016.html +24 -0
  146. data/web/rdoc/classes/ReapCommand.src/M000018.html +29 -0
  147. data/web/rdoc/classes/Scaffold.html +211 -0
  148. data/web/rdoc/classes/Scaffold.src/M000086.html +16 -0
  149. data/web/rdoc/classes/Scaffold.src/M000087.html +28 -0
  150. data/web/rdoc/classes/Scaffold.src/M000088.html +32 -0
  151. data/web/rdoc/classes/Scaffold.src/M000089.html +18 -0
  152. data/web/rdoc/classes/UnitTestKernel.html +176 -0
  153. data/web/rdoc/classes/UnitTestKernel.src/M000019.html +18 -0
  154. data/web/rdoc/classes/UnitTestKernel.src/M000020.html +18 -0
  155. data/web/rdoc/classes/UnitTestKernel.src/M000021.html +22 -0
  156. data/web/rdoc/classes/UnitTestKernel.src/M000022.html +22 -0
  157. data/web/rdoc/classes/UnitTesting.html +165 -0
  158. data/web/rdoc/classes/UnitTesting.src/M000090.html +34 -0
  159. data/web/rdoc/classes/UnitTesting.src/M000091.html +18 -0
  160. data/web/rdoc/classes/UnitTesting/Failure.html +156 -0
  161. data/web/rdoc/classes/UnitTesting/Failure.src/M000092.html +18 -0
  162. data/web/rdoc/classes/UnitTesting/Failure.src/M000093.html +21 -0
  163. data/web/rdoc/created.rid +1 -0
  164. data/web/rdoc/files/ANN.html +107 -0
  165. data/web/rdoc/files/COPYING.html +119 -0
  166. data/web/rdoc/files/ChangeLog.html +144 -0
  167. data/web/rdoc/files/ProjectInfo.html +190 -0
  168. data/web/rdoc/files/README.html +274 -0
  169. data/web/rdoc/files/Rakefile.html +101 -0
  170. data/web/rdoc/files/lib/reap/bin/reap_rb.html +129 -0
  171. data/web/rdoc/files/lib/reap/lint_rb.html +101 -0
  172. data/web/rdoc/files/lib/reap/projectinfo_rb.html +110 -0
  173. data/web/rdoc/files/lib/reap/readymade_rb.html +123 -0
  174. data/web/rdoc/files/lib/reap/task/announce_rb.html +114 -0
  175. data/web/rdoc/files/lib/reap/task/fileperm_rb.html +108 -0
  176. data/web/rdoc/files/lib/reap/task/info_rb.html +108 -0
  177. data/web/rdoc/files/lib/reap/task/install_rb.html +108 -0
  178. data/web/rdoc/files/lib/reap/task/noop_rb.html +108 -0
  179. data/web/rdoc/files/lib/reap/task/package_rb.html +109 -0
  180. data/web/rdoc/files/lib/reap/task/publish_rb.html +108 -0
  181. data/web/rdoc/files/lib/reap/task/rdoc_rb.html +108 -0
  182. data/web/rdoc/files/lib/reap/task/scaffold_rb.html +107 -0
  183. data/web/rdoc/files/lib/reap/task/test_rb.html +110 -0
  184. data/web/rdoc/files/lib/reap/task/testext_rb.html +109 -0
  185. data/web/rdoc/files/lib/reap/task/webpublish_rb.html +108 -0
  186. data/web/rdoc/files/lib/reap/task_rb.html +120 -0
  187. data/web/rdoc/files/lib/reap/tasks_rb.html +116 -0
  188. data/web/rdoc/files/lib/reap/test_rb.html +109 -0
  189. data/web/rdoc/fr_class_index.html +47 -0
  190. data/web/rdoc/fr_file_index.html +51 -0
  191. data/web/rdoc/fr_method_index.html +124 -0
  192. data/web/rdoc/index.html +24 -0
  193. data/web/rdoc/rdoc-style.css +208 -0
  194. metadata +257 -138
  195. data/bin/rubytest +0 -5
  196. data/data/reap/scaffold/standard/COPYING +0 -403
  197. data/data/reap/scaffold/standard/INSTALL +0 -14
  198. data/data/reap/scaffold/standard/README +0 -3
  199. data/data/reap/scaffold/standard/Rakefile +0 -10
  200. data/data/reap/scaffold/standard/setup.rb +0 -1568
  201. data/data/reap/scaffold/subversion/trunk/COPYING +0 -403
  202. data/data/reap/scaffold/subversion/trunk/INSTALL +0 -14
  203. data/data/reap/scaffold/subversion/trunk/ProjectInfo +0 -78
  204. data/data/reap/scaffold/subversion/trunk/README +0 -3
  205. data/data/reap/scaffold/subversion/trunk/Rakefile +0 -10
  206. data/data/reap/scaffold/subversion/trunk/setup.rb +0 -1568
  207. data/data/reap/setup.rb +0 -1568
  208. data/doc/COPYING +0 -403
  209. data/doc/ChangeLog +0 -18
  210. data/doc/LATEST +0 -29
  211. data/doc/README +0 -182
  212. data/doc/doap.xml +0 -27
  213. data/doc/note/ProjectInfo.rb +0 -88
  214. data/doc/note/Rakefile.0 +0 -118
  215. data/doc/note/Rakefile.htm +0 -69
  216. data/doc/note/application.rb +0 -124
  217. data/doc/note/interface/rubyforge.rb +0 -247
  218. data/doc/note/intro.txt +0 -42
  219. data/doc/note/package.rb +0 -629
  220. data/doc/note/package.rb.0 +0 -394
  221. data/doc/note/scaffold.rb +0 -123
  222. data/lib/reap/app.rb +0 -74
  223. data/lib/reap/bin/rubylint.rb +0 -1
  224. data/lib/reap/bin/rubytest.rb +0 -45
  225. data/lib/reap/rake.rb +0 -12
  226. data/lib/reap/rakeadapter.rb +0 -50
  227. data/lib/reap/reap.rb +0 -32
  228. data/lib/reap/task/custom.rb +0 -12
  229. data/lib/reap/task/doap.rb +0 -85
  230. data/lib/reap/task/extest.rb +0 -161
  231. data/lib/reap/task/manifest.rb +0 -70
  232. data/lib/reap/task/release.rb +0 -512
  233. data/lib/reap/task/template.rb +0 -46
  234. data/lib/reap/vendor/http-access2.rb +0 -1590
  235. data/lib/reap/vendor/http-access2/cookie.rb +0 -538
  236. data/lib/reap/vendor/http-access2/http.rb +0 -542
@@ -1,394 +0,0 @@
1
-
2
- require 'reap/task'
3
-
4
- begin
5
- require 'rubygems'
6
- rescue LoadError
7
- # no rubygems
8
- end
9
-
10
- ##
11
- # Package Task
12
- #
13
- # This task creates standard .zip, .tgz, or .tbz
14
- # packages, plus .gem distributions.
15
- #
16
- class Reap::Package < Reap::Task
17
-
18
- task_desc do
19
- disttypes = $PROJECT_INFO['distribute'] || [ 'gem', 'tar.bz2', 'zip' ]
20
- "Build distribution packages (#{disttypes.join(', ')})."
21
- end
22
-
23
- MUST_EXCLUDE = [ 'InstalledFiles', '**/CVS/**/*', '**/*~', 'dist', 'pkg' ]
24
- LOCATIONS = [ '../leaf', '../dist', '../pkg', 'dist', 'pkg' ]
25
-
26
- attr_master :name, :version, :date, :series, :status,
27
- :author, :maintainer, :email, :homepage,
28
- :summary, :description, :license
29
-
30
- attr_master :dependencies, :executables, :requirements, :architecture,
31
- :category, :recommends, :replaces
32
-
33
- attr_accessor :source, :md5
34
-
35
- attr_accessor :dir, :project, :exclude, :include, :format
36
-
37
- subsection :gem,
38
- :autorequire, :platform, :require_paths
39
-
40
-
41
-
42
- # generated
43
-
44
- attr_reader :package_name, :series_versioning
45
-
46
-
47
- def init( options={} )
48
- @dir ||= LOCATIONS.find { |f| File.directory?(f) } || 'dist'
49
-
50
- #@name ||= master['name']
51
- #@status ||= master['status'] || 'beta/stable'
52
- #@date ||= master['date'] || Time.now.strftime("%Y-%m-%d")
53
- #@series ||= master['series'] || '1'
54
-
55
- @maintainer ||= @author
56
- @status ||= 'beta/stable'
57
- @date ||= Time.now.strftime("%Y-%m-%d")
58
- @series ||= '1'
59
- @architecture ||= 'any'
60
- @license ||= 'Ruby/GPL'
61
-
62
- d = @date.split('-').collect{ |e| e.to_i }
63
- #d[0] = d[0] - 2000 # No need to keep the 2000
64
- @version ||= d.join('.')
65
-
66
- if $BUILD_VERSION
67
- buildno = eval(Time.now.strftime("%H*60+%M"))
68
- @version += ".#{buildno}"
69
- end
70
-
71
- unless @series
72
- puts "Series is required."
73
- exit 0
74
- end
75
-
76
- @package_name ||= @name + '-' + @version
77
- #@package_name ||= @name + ',' + @date # rubyforge doesn't allow commas
78
-
79
- #@author ||= master['author']
80
- #@email ||= master['email']
81
- #@summary ||= master['summary']
82
- @project ||= master['rubyforge']['project']
83
- #@homepage ||= master['homepage'] || master['rubyforge']['homepage']
84
- @homepage ||= master['rubyforge']['homepage']
85
-
86
- @exclude ||= []
87
- @exclude |= MUST_EXCLUDE
88
-
89
- @include ||= ['**/*']
90
-
91
- # format types include 'tgz', 'tbz', 'zip', 'tar.gz' 'tar.bz2', 'gem' and 'deb'.
92
- @format ||= master['distribute'] || [ 'gem', 'tar.bz2', 'zip' ]
93
- @format = [@format].flatten
94
- @format.collect! { |t| t.to_s.strip.downcase }
95
-
96
- @dependencies ||= []
97
- @executables ||= []
98
- @requirements ||= []
99
- @recommends ||= []
100
- @conflicts ||= []
101
- @replaces ||= []
102
-
103
- # gem specific (at least in this context)
104
- if defined?(Gem)
105
- if @platform
106
- begin
107
- @platform = ::Gem.const_get(@platform)
108
- rescue NameError
109
- @platform = ::Gem::Platform::RUBY
110
- end
111
- else
112
- @platform ||= ::Gem::Platform::RUBY
113
- end
114
- #@autorequire
115
- end
116
-
117
- end
118
-
119
- def run( options={} )
120
- puts "Creating #{@format.join(',')} packages..."
121
-
122
- # create package image
123
- group_dir_path = File.join( @dir, @package_name )
124
- package_dir_path = File.join( @dir, @package_name, @package_name )
125
-
126
- if FileTest.directory?(group_dir_path)
127
- print "Package directory '#{package_name}' already exists. Conitnue anyway or [R]emove and continue? [y/r/N] "
128
- until inp = $stdin.gets[0,1] ; sleep 1 ; end
129
- inp = inp.to_s.downcase
130
- case inp
131
- when 'y'
132
- # continue...
133
- when 'r'
134
- puts "Removing old directory '#{File.expand_path(group_dir_path)}'..."
135
- FileUtils.rm_r(group_dir_path)
136
- else
137
- puts "Reap package task canceled."
138
- return nil
139
- end
140
- end
141
- package_files = FileList.new
142
- package_files.include(*@include)
143
- package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
144
- FileUtils.mkdir_p @dir #rescue nil
145
- package_files.each do |f|
146
- pkgf = File.join(package_dir_path, f)
147
- fdir = File.dirname(pkgf)
148
- FileUtils.mkdir_p(fdir) if not File.exist?(fdir)
149
- if File.directory?(f)
150
- FileUtils.mkdir_p(pkgf)
151
- else
152
- FileUtils.rm_f(pkgf)
153
- FileUtils.safe_ln(f, pkgf)
154
- end
155
- end
156
-
157
- # create standard package files
158
- FileUtils.chdir( File.join( @dir, @package_name ) ) do
159
- @format.each do |t|
160
- sh_cmd = nil
161
- prefix = 'ERROR' # in case of unforseen bug
162
- case t
163
- when 'tbz', 'bz2', 'bzip2', 'tar.bz2'
164
- prefix = ( t == 'tbz' ? 'tbz' : 'tar.bz2' )
165
- sh_cmd = 'tar --bzip2 -cvf'
166
- puts "\nReap is shelling out work to tar and bzip2..."
167
- when 'tgz', 'tar.gz'
168
- prefix = ( t == 'tgz' ? 'tgz' : 'tar.gz' )
169
- sh_cmd = 'tar --gzip -cvf'
170
- puts "\nReap is shelling out work to tar and gzip..."
171
- when 'zip'
172
- prefix = 'zip'
173
- sh_cmd = 'zip -r'
174
- puts "\nReap is shelling out work to zip..."
175
- when 'gem', 'deb', 'pac'
176
- sh_cmd = nil
177
- else
178
- puts "Unknown package type '#{t}' skipped."
179
- sh_cmd = nil
180
- end
181
- sh %{#{sh_cmd} #{@package_name}.#{prefix} #{@package_name}} if sh_cmd
182
- end
183
- puts
184
- end
185
-
186
- # create gem package
187
-
188
- if @format.include?('gem')
189
- if defined?(Gem)
190
- run_gem
191
- else
192
- puts "Package .gem requested, but rubygems not found (skipped)."
193
- end
194
- end
195
-
196
- # create debian package
197
-
198
- if @format.include?('deb')
199
- if true # TODO ensure required debian tools here
200
- run_deb
201
- else
202
- puts "Package .deb requested, but debian tools not found (skipped)."
203
- end
204
- end
205
-
206
- # create PKGBUILD (pacman, archlinux)
207
-
208
- if @format.include?('pac')
209
- if true # TODO ensure required tools here
210
- run_pacman
211
- else
212
- puts "Pacman package requested, but required tools not found (skipped)."
213
- end
214
- end
215
-
216
- return true
217
- end
218
-
219
- # support methods -------------------------------------------
220
-
221
- private
222
-
223
- # This builds the gem package.
224
-
225
- def run_gem
226
- spec = Gem::Specification.new { |s|
227
- s.name = @name
228
- s.version = @version
229
-
230
- @dependencies.each { |d,v|
231
- if v
232
- s.add_dependency(d, v)
233
- else
234
- s.add_dependency(d)
235
- end
236
- }
237
-
238
- s.platform = @platform
239
- s.summary = @summary
240
- s.requirements = @requirements
241
-
242
- # s.files = Dir.glob("lib/**/*").delete_if {|item| item.include?("CVS")}
243
- # s.files.concat Dir.glob("bin/**/*").delete_if {|item| item.include?("CVS")}
244
- package_files = FileList.new
245
- package_files.include(*@include)
246
- package_files.exclude(*@exclude) if @exclude and not @exclude.empty?
247
- s.files = package_files.to_a
248
-
249
- s.require_path = 'lib'
250
- s.autorequire = @autorequire if @autorequire
251
- s.author = @author
252
- s.email = @email
253
- s.rubyforge_project = @project
254
- s.homepage = @homepage
255
- s.executables = @executables
256
- s.require_paths = @require_paths if @require_paths
257
- s.bindir = "bin"
258
- s.has_rdoc = true
259
- }
260
-
261
- puts "Reap is shelling out work to the Gem Package Manager..."
262
- Gem.manage_gems
263
- Gem::Builder.new(spec).build
264
- gems = Dir.glob( './*.gem' )
265
- gems.each{ |f|
266
- FileUtils.mv( f, File.join( @dir, @package_name ) )
267
- }
268
- #sh %{mv ./*.gem #{@dir}/}
269
- end
270
-
271
-
272
- # This build the Debiam package.
273
-
274
- def run_deb
275
-
276
- # build the debian control file
277
-
278
- dep = dependencies.collect{ |d, v|
279
- if v
280
- "#{d} (#{v})"
281
- else
282
- d
283
- end
284
- }.join(', ')
285
-
286
- # Some debian fields not yet used:
287
- # Installed-Size: 1024
288
- # Conflicts: wile-e-coyote, ...
289
- # Replaces: sam-sheepdog
290
- # Pre-Depends: perl, ...
291
- # Suggests: docbook
292
-
293
- ctrl = %{
294
- Package: #{name}
295
- Version: #{version}
296
- Priority: optional
297
- Architecture: #{architecture}
298
- Essential: no
299
- }.tabto(0)
300
- ctrl << "Section: #{category}" if category
301
- ctrl << "Depends: #{dep}" unless dep.empty?
302
- ctrl << "Recommends: #{recommends.join(' | ')}" unless recommends.empty?
303
- ctrl << %{
304
- Maintainer: #{maintainer} [#{email}]
305
- Provides: #{name}
306
- Description: #{summary}
307
- .
308
- #{description}
309
- }.tabto(0)
310
-
311
- debname = architecture == 'any' ? "ruby_#{name}_#{version}.deb" : "ruby_#{name}_#{version}_#{architecture}.deb"
312
- debdir = File.join( @dir, @package_name, 'debian' )
313
- debdebdir = File.join( debdir, 'DEBIAN' )
314
- debfile = File.join( debdir, debname )
315
-
316
- puts "Reap is shelling out work to the deb-pkg..."
317
- FileUtils.mkdir_p(debdir)
318
- sh %{ruby setup.rb all --prefix=#{debdir}}
319
- FileUtils.mkdir_p(debdebdir)
320
- File.open( File.join(debdebdir, 'control'), 'w') { |f| f << ctrl }
321
- #sh %{dpkg-deb -b #{debdir} #{debfile}}
322
- end
323
-
324
-
325
- # This builds a pacman/archlinux package
326
-
327
- def run_pac
328
-
329
- unless @source
330
- puts "URL 'source' is require for proto package."
331
- return nil
332
- end
333
-
334
- if section.key?('proto')
335
- _dep = section['proto']['dependenciers'] || dependencies
336
- _rep = section['proto']['replaces'] || replaces
337
- _con = section['proto']['conflicts'] || conflicts
338
- end
339
-
340
- _dep = _dep.collect{ |d| "'#{d}'" }.join(' ')
341
- _rep = _rep.collect{ |d| "'#{d}'" }.join(' ')
342
- _con = _rep.collect{ |d| "'#{d}'" }.join(' ')
343
-
344
- proto = %{
345
- pkgname=#{name}
346
- pkgver=#{version}
347
- pkgrel=#{series}
348
- pkgdesc="#{summary}"
349
- url="#{homepage}"
350
- license="#{license}"
351
- depends=(#{_dep})
352
- conflicts=(#{_con})
353
- replaces=(#{_rep})
354
- source=(#{source})
355
- md5sums=(#{md5})
356
- }.tabto(0)
357
-
358
- # What are these for?
359
- # install=
360
- # backup=()
361
-
362
- if usemake
363
- s << %{
364
- makedepends=()"
365
- build() {
366
- cd $startdir/src/$pkgname-$pkgver
367
- ./ruby setup.rb --prefix=/usr
368
- make || return 1
369
- make DESTDIR=$startdir/pkg install
370
- }
371
- }.tabto(0)
372
- else
373
- s << %{
374
- build() {
375
- cd $startdir/src/$pkgname-$pkgver
376
- ./ruby setup.rb --prefix=/usr
377
- }
378
- }
379
- end
380
-
381
- pacdir = File.join( @dir, @package_name, 'pacman' )
382
- pacpacdir = File.join( pacdir, 'PACMAN' )
383
- pacfile = File.join( pacdir, 'PKGBUILD' )
384
-
385
- puts "Reap is shelling out work to the pacman..."
386
- FileUtils.mkdir_p(pacdir)
387
- #sh %{ruby setup.rb all --prefix=#{debdir}}
388
- #FileUtils.mkdir_p(pacpacdir)
389
- File.open( pacfile, 'w') { |f| f << proto }
390
- #sh %{dpkg-deb -b #{debdir} #{debfile}}
391
-
392
- end
393
-
394
- end
@@ -1,123 +0,0 @@
1
-
2
- #require 'rbconfig'
3
- #require 'reap/projectinfo'
4
-
5
- # ___ __ __ _ _ _____ _
6
- # / __| __ __ _ / _|/ _|___| |__| | |_ _|_ _ __| |__
7
- # \__ \/ _/ _` | _| _/ _ \ / _` | | |/ _` (_-< / /
8
- # |___/\__\__,_|_| |_| \___/_\__,_| |_|\__,_/__/_\_\
9
- #
10
-
11
- module Scaffold
12
- extend self
13
-
14
- SVNPaths => %w{
15
- trunk
16
- branch
17
- tag
18
- scrap
19
- package
20
- }
21
-
22
- TrunkPaths = %w{
23
- bin
24
- lib
25
- ext
26
- conf
27
- data
28
- test
29
- note
30
- sample
31
- }
32
-
33
- TrunkFiles = %w{
34
- README
35
- INSTALL
36
- COPYING
37
- ProjectInfo
38
- ChangeLog
39
- Todo
40
- RakeFile
41
- setup.rb
42
- }
43
-
44
- def init( scf )
45
- scf.name ||= 'yourlib.projectdomain.org'
46
- end
47
-
48
- def run( scf )
49
- t = Time.now.strftime("%Y-%m-%d")
50
- libdir = File.join( 'lib', "#{@name},#{t}" )
51
-
52
- if @scm
53
- SCMPaths.each { |d| makedir( d ) }
54
- Dir.chdir 'trunk'
55
- end
56
- TrunkPaths.each { |d| makedir( d ) }
57
- makedir_with_check( libdir )
58
- TrunkFiles.each { |f| temlpate( f ) }
59
- end
60
-
61
- private
62
-
63
- # Copy a file from lib/data to the current dir.
64
-
65
- def template( filename )
66
- dir = File.join( File.dirname(__FILE__), 'data' )
67
- #dir = File.join( ::Config::CONFIG['datadir'], DATA_DIR )
68
- f = File.join( dir, filename )
69
- unless File.file?( f )
70
- puts f
71
- raise "Tempfile is missing."
72
- end
73
-
74
- if File.exists?(filename)
75
- puts "#{filename} already exists."
76
- return
77
- end
78
- # copy tmpf to Reapfile
79
- FileUtils.cp( f, filename )
80
- #puts "#{filename} created. You'll need to fill it out."
81
- end
82
-
83
- # Make a directory as long as it doesn't already exist.
84
-
85
- def makedir( dir )
86
- FileUtils.makedir_p( dir ) unless File.directory?( dir )
87
- end
88
-
89
- end
90
-
91
-
92
-
93
- =begin
94
- def scaffold
95
- require 'reap/scaffold'
96
- name =
97
- domain =
98
- Scaffold.go( name, domain )
99
- end
100
-
101
- def template( file_name = ProjectInfo )
102
- #dir = File.dirname(File.dirname(__FILE__))
103
- dir = File.join( ::Config::CONFIG['datadir'], DATA_DIR )
104
-
105
- tmpf = File.join( dir, 'template.yaml' )
106
- unless File.file?( tmpf )
107
- puts tmpf
108
- raise "Tempfile is missing."
109
- end
110
-
111
- if File.directory?(filename)
112
- puts "#{filename} a directory. Cannot comply."
113
- return
114
- elsif File.file?(filename)
115
- puts "#{filename} already exists."
116
- return
117
- end
118
- # copy tmpf to Reapfile
119
- FileUtils.cp( tmpf, filename )
120
- puts "#{filename} created. You'll need to fill it out."
121
- end
122
- =end
123
-