Class: FPM::Cookery::Package::Dir

Inherits:
Package
  • Object
show all
Defined in:
lib/fpm/cookery/package/dir.rb

Instance Attribute Summary

Attributes inherited from Package

#config, #fpm, #recipe

Instance Method Summary collapse

Methods inherited from Package

#add_script, #cleanup, #convert, #epoch=, #initialize, #maintainer=, #vendor=, #version=

Constructor Details

This class inherits a constructor from FPM::Cookery::Package::Package

Instance Method Details

#fpm_objectObject



8
9
10
# File 'lib/fpm/cookery/package/dir.rb', line 8

def fpm_object
  FPM::Package::Dir.new
end

#package_inputObject



17
18
19
20
21
22
23
# File 'lib/fpm/cookery/package/dir.rb', line 17

def package_input
  inputs = config.fetch(:input, nil) || '.'

  Array(inputs).each do |path|
    fpm.input(path)
  end
end

#package_setupObject



12
13
14
15
# File 'lib/fpm/cookery/package/dir.rb', line 12

def package_setup
  fpm.attributes[:prefix] = '/'
  fpm.attributes[:chdir] = recipe.destdir.to_s
end