Class: LIBUSB::LibusbRecipe
- Inherits:
-
MiniPortile
- Object
- MiniPortile
- LIBUSB::LibusbRecipe
- Defined in:
- lib/libusb/libusb_recipe.rb
Constant Summary collapse
- ROOT =
File.('../../..', __FILE__)
Instance Method Summary collapse
- #cook_and_activate ⇒ Object
-
#initialize ⇒ LibusbRecipe
constructor
A new instance of LibusbRecipe.
Constructor Details
#initialize ⇒ LibusbRecipe
Returns a new instance of LibusbRecipe.
11 12 13 14 15 16 17 |
# File 'lib/libusb/libusb_recipe.rb', line 11 def initialize super("libusb", LIBUSB_VERSION) self.target = File.join(ROOT, "ports") self.files = [url: LIBUSB_SOURCE_URI, sha256: LIBUSB_SOURCE_SHA256] self.patch_files = Dir[File.join(ROOT, "patches", self.name, self.version, "*.patch")].sort self. = [] end |
Instance Method Details
#cook_and_activate ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/libusb/libusb_recipe.rb', line 19 def cook_and_activate checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{self.host}.installed") unless File.exist?(checkpoint) self.cook FileUtils.touch checkpoint end self.activate self end |