Class: FPM::Cookery::DirRecipe
- Inherits:
-
Recipe
- Object
- BaseRecipe
- Recipe
- FPM::Cookery::DirRecipe
- Defined in:
- lib/fpm/cookery/recipe.rb
Overview
Helps packaging a directory of content
Instance Attribute Summary
Attributes inherited from Recipe
Attributes included from PathHelper
#installing, #omnibus_installing
Instance Method Summary collapse
-
#build ⇒ Object
Dir Recipes by default build action.
- #input(config) ⇒ Object
-
#install ⇒ Object
Default action for a dir recipe install is to copy items selected.
Methods inherited from Recipe
apply, #extract, extracted_source, hiera, #initialize, source, #source_handler, #template, #to_h, #to_json, #to_pretty_json
Methods inherited from BaseRecipe
architectures, builddir, cachedir, datadir, depends_all, #depends_all, destdir, pkgdir, platform, platforms, targets, tmp_root, workdir
Methods included from InheritableAttr
#attr_rw, #attr_rw_hash, #attr_rw_list, #attr_rw_path, extended, inherit_for, #register_attrs
Methods included from LifecycleHooks
#after_build, #after_dependency_installation, #after_install, #after_package_create, #after_source_download, #after_source_extraction, #before_build, #before_dependency_installation, #before_install, #before_package_create, #before_source_download, #before_source_extraction, #run_lifecycle_hook
Methods included from PathHelper
#bin, #doc, #etc, #include, #info, #installing?, #lib, #libexec, #man, #man1, #man2, #man3, #man4, #man5, #man6, #man7, #man8, #omnibus_installing?, #opt, #prefix, #root, #sbin, #share, #var, #with_trueprefix
Constructor Details
This class inherits a constructor from FPM::Cookery::Recipe
Instance Method Details
#build ⇒ Object
Dir Recipes by default build action.
317 318 |
# File 'lib/fpm/cookery/recipe.rb', line 317 def build end |
#input(config) ⇒ Object
312 313 314 |
# File 'lib/fpm/cookery/recipe.rb', line 312 def input(config) FPM::Cookery::Package::Dir.new(self, config) end |
#install ⇒ Object
Default action for a dir recipe install is to copy items selected
321 322 323 324 325 326 327 328 329 330 |
# File 'lib/fpm/cookery/recipe.rb', line 321 def install FileUtils.cp_r File.join(builddir, '.'), destdir # Remove build cookies %w(build extract).each do || Dir.glob("#{destdir}/.#{}-cookie-*").each do |f| Log.info "Deleting FPM Cookie #{f}" File.delete(f) end end end |