rbcdio 0.01
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/COPYING +340 -0
- data/ChangeLog +315 -0
- data/INSTALL +236 -0
- data/Makefile.am +163 -0
- data/Makefile.in +557 -0
- data/NEWS +5 -0
- data/README +75 -0
- data/Rakefile +234 -0
- data/THANKS +3 -0
- data/VERSION +1 -0
- data/VERSION.in +1 -0
- data/config.guess +1473 -0
- data/config.sub +1576 -0
- data/configure +4802 -0
- data/configure.ac +158 -0
- data/data/copying.iso +0 -0
- data/data/isofs-m1.bin +0 -0
- data/data/isofs-m1.cue +3 -0
- data/doc/created.rid +1 -0
- data/doc/fr_class_index.html +42 -0
- data/doc/fr_file_index.html +40 -0
- data/doc/fr_method_index.html +133 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/example/COPYING +340 -0
- data/example/README +47 -0
- data/example/audio.rb +186 -0
- data/example/cd-read.rb +167 -0
- data/example/copying +340 -0
- data/example/device.rb +91 -0
- data/example/drivers.rb +63 -0
- data/example/drives.rb +63 -0
- data/example/eject.rb +69 -0
- data/example/iso1.rb +89 -0
- data/example/iso2.rb +106 -0
- data/example/iso3.rb +111 -0
- data/example/tracks.rb +83 -0
- data/ext/cdio/Makefile +139 -0
- data/ext/cdio/extconf.rb +9 -0
- data/ext/cdio/rubycdio_wrap.c +3410 -0
- data/ext/iso9660/Makefile +139 -0
- data/ext/iso9660/extconf.rb +10 -0
- data/ext/iso9660/rubyiso9660_wrap.c +3005 -0
- data/install-sh +323 -0
- data/lib/Makefile +7 -0
- data/lib/cdio.rb +1000 -0
- data/lib/iso9660.rb +566 -0
- data/missing +360 -0
- data/rubycdio.m4 +14 -0
- data/swig/Makefile +7 -0
- data/swig/audio.swg +63 -0
- data/swig/compat.swg +104 -0
- data/swig/device.swg +513 -0
- data/swig/device_const.swg +144 -0
- data/swig/disc.swg +96 -0
- data/swig/read.swg +164 -0
- data/swig/rubycdio.swg +86 -0
- data/swig/rubyiso9660.swg +827 -0
- data/swig/track.swg +206 -0
- data/swig/types.swg +65 -0
- data/test/Makefile +7 -0
- data/test/Rakefile +8 -0
- data/test/cdda.bin +0 -0
- data/test/cdda.cue +7 -0
- data/test/cdda.toc +14 -0
- data/test/cdiotest.rb +228 -0
- data/test/isocopy.rb +394 -0
- data/test/isotest.rb +187 -0
- metadata +116 -0
data/Rakefile
ADDED
@@ -0,0 +1,234 @@
|
|
1
|
+
SO_NAME = "rubcdio.so"
|
2
|
+
|
3
|
+
# ------- Default Package ----------
|
4
|
+
CDIO_VERSION = open("VERSION").read.chomp
|
5
|
+
PKG_NAME = 'rbcdio'
|
6
|
+
|
7
|
+
FILES = FileList[
|
8
|
+
'AUTHORS',
|
9
|
+
'COPYING',
|
10
|
+
'ChangeLog',
|
11
|
+
'INSTALL',
|
12
|
+
'Makefile.am',
|
13
|
+
'Makefile.in',
|
14
|
+
'NEWS',
|
15
|
+
'README',
|
16
|
+
'Rakefile',
|
17
|
+
'THANKS',
|
18
|
+
'VERSION',
|
19
|
+
'VERSION.in',
|
20
|
+
'config.guess',
|
21
|
+
'config.sub',
|
22
|
+
'configure',
|
23
|
+
'configure.ac',
|
24
|
+
'data/**/*',
|
25
|
+
'doc/*',
|
26
|
+
'example/*',
|
27
|
+
'ext/**/*.c',
|
28
|
+
'ext/**/Makefile',
|
29
|
+
'ext/**/extconf.rb',
|
30
|
+
'install-sh',
|
31
|
+
'lib/*.rb',
|
32
|
+
'lib/Makefile',
|
33
|
+
'missing',
|
34
|
+
'rubycdio.m4',
|
35
|
+
'swig/*.swg',
|
36
|
+
'swig/Makefile',
|
37
|
+
'test/*.rb',
|
38
|
+
'test/Makefile',
|
39
|
+
'test/Rakefile',
|
40
|
+
'test/cdda.bin',
|
41
|
+
'test/cdda.cue',
|
42
|
+
'test/cdda.toc'
|
43
|
+
]
|
44
|
+
|
45
|
+
require 'rake/gempackagetask'
|
46
|
+
task :default => [:all]
|
47
|
+
|
48
|
+
# --- Redo Rake::PackageTask::define so tar uses -h to include
|
49
|
+
# files of a symbolic link.
|
50
|
+
module Rake
|
51
|
+
class PackageTask < TaskLib
|
52
|
+
# Create the tasks defined by this task library.
|
53
|
+
def define
|
54
|
+
fail "Version required (or :noversion)" if @version.nil?
|
55
|
+
@version = nil if :noversion == @version
|
56
|
+
|
57
|
+
desc "Build all the packages"
|
58
|
+
task :package
|
59
|
+
|
60
|
+
desc "Force a rebuild of the package files"
|
61
|
+
task :repackage => [:clobber_package, :package]
|
62
|
+
|
63
|
+
desc "Remove package products"
|
64
|
+
task :clobber_package do
|
65
|
+
rm_r package_dir rescue nil
|
66
|
+
end
|
67
|
+
|
68
|
+
task :clobber => [:clobber_package]
|
69
|
+
|
70
|
+
[
|
71
|
+
[need_tar, tgz_file, "z"],
|
72
|
+
[need_tar_gz, tar_gz_file, "z"],
|
73
|
+
[need_tar_bz2, tar_bz2_file, "j"]
|
74
|
+
].each do |(need, file, flag)|
|
75
|
+
if need
|
76
|
+
task :package => ["#{package_dir}/#{file}"]
|
77
|
+
file "#{package_dir}/#{file}" => [package_dir_path] + package_files do
|
78
|
+
chdir(package_dir) do
|
79
|
+
sh %{tar #{flag}hcvf #{file} #{package_name}}
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
if need_zip
|
86
|
+
task :package => ["#{package_dir}/#{zip_file}"]
|
87
|
+
file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do
|
88
|
+
chdir(package_dir) do
|
89
|
+
sh %{zip -r #{zip_file} #{package_name}}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
directory package_dir
|
95
|
+
|
96
|
+
file package_dir_path => @package_files do
|
97
|
+
mkdir_p package_dir rescue nil
|
98
|
+
@package_files.each do |fn|
|
99
|
+
f = File.join(package_dir_path, fn)
|
100
|
+
fdir = File.dirname(f)
|
101
|
+
mkdir_p(fdir) if !File.exist?(fdir)
|
102
|
+
if File.directory?(fn)
|
103
|
+
mkdir_p(f)
|
104
|
+
else
|
105
|
+
rm_f f
|
106
|
+
safe_ln(fn, f)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
self
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# --------- GEM package ------
|
116
|
+
require 'rubygems'
|
117
|
+
desc "Create GEM spec file"
|
118
|
+
default_spec = Gem::Specification.new do |spec|
|
119
|
+
spec.name = PKG_NAME
|
120
|
+
|
121
|
+
spec.homepage = "http://rubyforge.org/projects/rbcdio/"
|
122
|
+
spec.summary = "Ruby to libcdio (CD Input and Control library)"
|
123
|
+
spec.description = <<-EOF
|
124
|
+
A library for CD-ROM and CD image access. Applications wishing to be
|
125
|
+
oblivious of the OS- and device-dependent properties of a CD-ROM or of
|
126
|
+
the specific details of various CD-image formats may benefit from
|
127
|
+
using this library. A library for working with ISO-9660 filesystems
|
128
|
+
is included.
|
129
|
+
EOF
|
130
|
+
|
131
|
+
spec.version = CDIO_VERSION
|
132
|
+
|
133
|
+
spec.author = "Rocky Bernstein"
|
134
|
+
spec.email = "rocky@gnu.org"
|
135
|
+
spec.platform = Gem::Platform::RUBY
|
136
|
+
spec.require_path = "lib"
|
137
|
+
spec.bindir = "bin"
|
138
|
+
spec.executables = []
|
139
|
+
spec.extensions = ["ext/cdio/extconf.rb", "ext/iso9660/extconf.rb"]
|
140
|
+
spec.autorequire = "rubycdio"
|
141
|
+
spec.files = FILES.to_a
|
142
|
+
spec.test_files = FileList['tests/**/*']
|
143
|
+
|
144
|
+
spec.required_ruby_version = '>= 1.8.2'
|
145
|
+
spec.date = DateTime.now
|
146
|
+
spec.rubyforge_project = 'rbcdio'
|
147
|
+
|
148
|
+
# rdoc
|
149
|
+
spec.has_rdoc = true
|
150
|
+
end
|
151
|
+
|
152
|
+
# Rake task to build the default package
|
153
|
+
desc "Build all the packages (gem, tgz, zip)"
|
154
|
+
Rake::GemPackageTask.new(default_spec) do |pkg|
|
155
|
+
pkg.need_zip = true
|
156
|
+
pkg.need_tar = true
|
157
|
+
end
|
158
|
+
|
159
|
+
### Windows specification
|
160
|
+
##win_spec = default_spec.clone
|
161
|
+
##win_spec.extensions = []
|
162
|
+
##win_spec.platform = Gem::Platform::WIN32
|
163
|
+
##win_spec.files += ["lib/#{SO_NAME}"]
|
164
|
+
##
|
165
|
+
##desc "Create Windows Gem"
|
166
|
+
##task :win32_gem do
|
167
|
+
## # Copy the win32 extension the top level directory
|
168
|
+
## current_dir = File.expand_path(File.dirname(__FILE__))
|
169
|
+
## source = File.join(current_dir, "ext", "win32", SO_NAME)
|
170
|
+
## target = File.join(current_dir, "lib", SO_NAME)
|
171
|
+
## cp(source, target)
|
172
|
+
##
|
173
|
+
## # Create the gem, then move it to pkg
|
174
|
+
## Gem::Builder.new(win_spec).build
|
175
|
+
## gem_file = "#{win_spec.name}-#{win_spec.version}-#{win_spec.platform}.gem"
|
176
|
+
## mv(gem_file, "pkg/#{gem_file}")
|
177
|
+
##
|
178
|
+
## # Remove win extension fro top level directory
|
179
|
+
## rm(target)
|
180
|
+
##end
|
181
|
+
|
182
|
+
|
183
|
+
# --------- Publish ------
|
184
|
+
desc "Publish rubycdio to RubyForge."
|
185
|
+
task :publish do
|
186
|
+
require 'rake/contrib/sshpublisher'
|
187
|
+
|
188
|
+
# Get ruby-debug path
|
189
|
+
ruby_debug_path = File.expand_path(File.dirname(__FILE__))
|
190
|
+
|
191
|
+
publisher = Rake::SshDirPublisher.new("rockyb@rubyforge.org",
|
192
|
+
"/var/www/gforge-projects/rbcdio", ruby_debug_path)
|
193
|
+
end
|
194
|
+
|
195
|
+
desc "Create shared objects"
|
196
|
+
task :all do
|
197
|
+
sh "./configure"
|
198
|
+
sh "make"
|
199
|
+
end
|
200
|
+
|
201
|
+
desc "Clear temp files"
|
202
|
+
task :clean do
|
203
|
+
sh "make clean"
|
204
|
+
end
|
205
|
+
|
206
|
+
# --------- RDoc Documentation ------
|
207
|
+
require 'rake/rdoctask'
|
208
|
+
Rake::RDocTask.new("rdoc") do |rdoc|
|
209
|
+
rdoc.rdoc_dir = 'doc'
|
210
|
+
rdoc.title = "rbcdio-debug"
|
211
|
+
# Show source inline with line numbers
|
212
|
+
rdoc.options += ("--exclude data --exclude test --exclude lib/cdio/ " +
|
213
|
+
"--exclude lib/iso9660/ --exclude pkg/" ).split()
|
214
|
+
# Make the readme file the start page for the generated html
|
215
|
+
rdoc.options << '--main' << 'README'
|
216
|
+
rdoc.rdoc_files.include('lib/*.rb',
|
217
|
+
'example/*.rb',
|
218
|
+
'example/README',
|
219
|
+
'README')
|
220
|
+
end
|
221
|
+
|
222
|
+
# --------- Regression tests ------
|
223
|
+
require 'rake/testtask'
|
224
|
+
Rake::TestTask.new('test') do |t|
|
225
|
+
t.pattern = 'test/*.rb'
|
226
|
+
t.warning = true
|
227
|
+
end
|
228
|
+
|
229
|
+
# 'check' is an the same thing as 'test'
|
230
|
+
Rake::TestTask.new('check') do |t|
|
231
|
+
t.pattern = 'test/*.rb'
|
232
|
+
t.warning = true
|
233
|
+
end
|
234
|
+
|
data/THANKS
ADDED
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.01
|
data/VERSION.in
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@PACKAGE_VERSION@
|