def initialize(target_dir,opts={})
@dir = target_dir
if opts[:source_dir]
@source_dir = opts[:source_dir]
else
@source_dir = target_dir
end
@theme={:name => 'Foo Icon Theme', :version => '0.0.1', :comment => 'Example Icon Theme', :dir => 'foo-icons', :bugzilla => '', :inherits => 'gnome'}
@theme[:name] = opts[:theme_name] if opts[:theme_name]
@theme[:version] = opts[:theme_version] if opts[:theme_version]
@theme[:comment] = opts[:theme_comment] if opts[:theme_comment]
@theme[:dir] = opts[:theme_dir] if opts[:theme_dir]
@theme[:bugzilla] = opts[:theme_bugzilla] if opts[:theme_bugzilla]
@theme[:inherits] = opts[:theme_inherits] if opts[:theme_inherits]
if opts[:create]
@buildtype = :source
initialize_build_sys
else
if File.exist?("#{@dir}/index.theme")
if File.exist?("#{@dir}/Makefile.am")
@buildtype = :binary
else
@buildtype = :none
end
else
if File.exist?("#{@dir}/src")
@buildtype = :source
else
@buildtype = :none
end
end
end
end