Class: Debian::Build::DebianTarballProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/debian/build/source_providers.rb

Instance Method Summary collapse

Constructor Details

#initialize(tarball_name_pattern = nil) ⇒ DebianTarballProvider

Returns a new instance of DebianTarballProvider.



127
128
129
# File 'lib/debian/build/source_providers.rb', line 127

def initialize(tarball_name_pattern = nil)
  @tarball_name_pattern = tarball_name_pattern
end

Instance Method Details

#retrieve(package) ⇒ Object



139
140
141
142
# File 'lib/debian/build/source_providers.rb', line 139

def retrieve(package)
  mkdir_p package.source_directory
  sh "cp #{Rake.original_dir}/#{tarball_name(package)} #{package.source_directory}"
end

#tarball_name(package) ⇒ Object



135
136
137
# File 'lib/debian/build/source_providers.rb', line 135

def tarball_name(package)
  eval( '"' + tarball_name_pattern + '"', package.get_binding)
end

#tarball_name_patternObject



131
132
133
# File 'lib/debian/build/source_providers.rb', line 131

def tarball_name_pattern
  @tarball_name_pattern ||= '#{name}-#{version}.tgz'
end