Class: Debian::Build::AbstractPackage

Inherits:
Rake::TaskLib
  • Object
show all
Extended by:
BuildDirectoryMethods
Includes:
HelperMethods
Defined in:
lib/debian/build/abstract_package.rb

Direct Known Subclasses

ModulePackage, Package

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BuildDirectoryMethods

build_directory, build_directory=

Methods included from HelperMethods

#get, #sudo, #uncompress

Constructor Details

#initialize(name) {|_self| ... } ⇒ AbstractPackage

Returns a new instance of AbstractPackage.

Yields:

  • (_self)

Yield Parameters:



18
19
20
21
22
23
24
25
26
# File 'lib/debian/build/abstract_package.rb', line 18

def initialize(name)
  @name = @package = name

  init
  yield self if block_given?
  define

  Debian::Build.packages << self
end

Instance Attribute Details

#exclude_from_buildObject

Returns the value of attribute exclude_from_build.



16
17
18
# File 'lib/debian/build/abstract_package.rb', line 16

def exclude_from_build
  @exclude_from_build
end

#nameObject (readonly)

Returns the value of attribute name.



15
16
17
# File 'lib/debian/build/abstract_package.rb', line 15

def name
  @name
end

#packageObject

Returns the value of attribute package.



16
17
18
# File 'lib/debian/build/abstract_package.rb', line 16

def package
  @package
end

Instance Method Details

#default_platformsObject



31
32
33
34
35
36
37
38
39
# File 'lib/debian/build/abstract_package.rb', line 31

def default_platforms
  unless exclude_from_build
    Platform.all
  else
    Platform.all.reject do |platform|
      platform.to_s.match exclude_from_build
    end
  end
end

#initObject



28
29
# File 'lib/debian/build/abstract_package.rb', line 28

def init
end

#requires_sources?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/debian/build/abstract_package.rb', line 41

def requires_sources?
  true
end

#to_sObject



45
46
47
# File 'lib/debian/build/abstract_package.rb', line 45

def to_s
  name.to_s
end