Class: GNOME2::Rake::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/gnome2/rake/package.rb

Defined Under Namespace

Classes: NativeConfiguration, WindowsConfiguration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_dir) ⇒ Package

Returns a new instance of Package.



29
30
31
32
33
34
35
# File 'lib/gnome2/rake/package.rb', line 29

def initialize(root_dir)
  @root_dir = Pathname.new(root_dir).expand_path
  @name = @root_dir.basename.to_s
  @windows = WindowsConfiguration.new
  @native = NativeConfiguration.new
  @external_packages = []
end

Instance Attribute Details

#external_packagesObject



57
58
59
60
61
# File 'lib/gnome2/rake/package.rb', line 57

def external_packages
  @external_packages.collect do |package|
    ExternalPackage.new(package)
  end
end

#nameObject (readonly)

Returns the value of attribute name.



24
25
26
# File 'lib/gnome2/rake/package.rb', line 24

def name
  @name
end

#nativeObject (readonly)

Returns the value of attribute native.



27
28
29
# File 'lib/gnome2/rake/package.rb', line 27

def native
  @native
end

#root_dirObject (readonly)

Returns the value of attribute root_dir.



25
26
27
# File 'lib/gnome2/rake/package.rb', line 25

def root_dir
  @root_dir
end

#windowsObject (readonly)

Returns the value of attribute windows.



26
27
28
# File 'lib/gnome2/rake/package.rb', line 26

def windows
  @windows
end

Instance Method Details

#download_dirObject



49
50
51
# File 'lib/gnome2/rake/package.rb', line 49

def download_dir
  tmp_dir + "download"
end

#glib2_root_dirObject



41
42
43
# File 'lib/gnome2/rake/package.rb', line 41

def glib2_root_dir
  project_root_dir + "glib2"
end

#patches_dirObject



53
54
55
# File 'lib/gnome2/rake/package.rb', line 53

def patches_dir
  @root_dir + "patches"
end

#project_root_dirObject



37
38
39
# File 'lib/gnome2/rake/package.rb', line 37

def project_root_dir
  @root_dir.parent
end

#tmp_dirObject



45
46
47
# File 'lib/gnome2/rake/package.rb', line 45

def tmp_dir
  @root_dir + "tmp"
end