Class: LIBUSB::LibusbRecipe

Inherits:
MiniPortile
  • Object
show all
Defined in:
lib/libusb/libusb_recipe.rb

Constant Summary collapse

ROOT =
File.expand_path('../../..', __FILE__)

Instance Method Summary collapse

Constructor Details

#initializeLibusbRecipe

Returns a new instance of LibusbRecipe.


11
12
13
14
15
16
# 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, sha1: LIBUSB_SOURCE_SHA1]
  self.configure_options = []
end

Instance Method Details

#cook_and_activateObject


18
19
20
21
22
23
24
25
26
# File 'lib/libusb/libusb_recipe.rb', line 18

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