Class: Debian::Build::DebianTarballProvider
- Inherits:
-
Object
- Object
- Debian::Build::DebianTarballProvider
- Defined in:
- lib/debian/build/source_providers.rb
Instance Method Summary collapse
-
#initialize(tarball_name_pattern = nil) ⇒ DebianTarballProvider
constructor
A new instance of DebianTarballProvider.
- #retrieve(package) ⇒ Object
- #tarball_name(package) ⇒ Object
- #tarball_name_pattern ⇒ Object
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_pattern ⇒ Object
131 132 133 |
# File 'lib/debian/build/source_providers.rb', line 131 def tarball_name_pattern @tarball_name_pattern ||= '#{name}-#{version}.tgz' end |