Class: Zint::ZintRecipe
- Inherits:
-
MiniPortileCMake
- Object
- MiniPortileCMake
- Zint::ZintRecipe
- Defined in:
- lib/zint/zint_recipe.rb
Constant Summary collapse
- ROOT =
File.("../../..", __FILE__)
Instance Method Summary collapse
- #cook_and_activate ⇒ Object
-
#initialize(name, vers, url, sha1) ⇒ ZintRecipe
constructor
A new instance of ZintRecipe.
- #port_path ⇒ Object
Constructor Details
#initialize(name, vers, url, sha1) ⇒ ZintRecipe
Returns a new instance of ZintRecipe.
11 12 13 14 15 |
# File 'lib/zint/zint_recipe.rb', line 11 def initialize(name, vers, url, sha1) super(name, vers) self.target = File.join(ROOT, "ports") self.files = [url: url, sha1: sha1] end |
Instance Method Details
#cook_and_activate ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/zint/zint_recipe.rb', line 21 def cook_and_activate checkpoint = File.join(target, "#{name}-#{version}-#{RUBY_PLATFORM}.installed") unless File.exist?(checkpoint) cook FileUtils.touch checkpoint end activate self end |
#port_path ⇒ Object
17 18 19 |
# File 'lib/zint/zint_recipe.rb', line 17 def port_path "#{target}/#{RUBY_PLATFORM}" end |