Class: BuildRecipe
- Inherits:
-
MiniPortile
- Object
- MiniPortile
- BuildRecipe
- Defined in:
- ext/extconf.rb
Instance Method Summary collapse
-
#configure_prefix ⇒ Object
Add “–prefix=/”, to avoid our actual build install path compiled into the binary.
- #cook_and_activate ⇒ Object
-
#initialize(name, version, files) ⇒ BuildRecipe
constructor
A new instance of BuildRecipe.
- #port_path ⇒ Object
Constructor Details
#initialize(name, version, files) ⇒ BuildRecipe
Returns a new instance of BuildRecipe.
40 41 42 43 44 45 46 |
# File 'ext/extconf.rb', line 40 def initialize(name, version, files) super(name, version) self.files = files rootdir = File.('../..', __FILE__) self.target = File.join(rootdir, "ports") self.patch_files = Dir[File.join(target, "patches", self.name, self.version, "*.patch")].sort end |
Instance Method Details
#configure_prefix ⇒ Object
Add “–prefix=/”, to avoid our actual build install path compiled into the binary. Instead use DESTDIR variable of make to set our install path.
54 55 56 |
# File 'ext/extconf.rb', line 54 def configure_prefix "--prefix=" end |
#cook_and_activate ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'ext/extconf.rb', line 58 def cook_and_activate checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{RUBY_PLATFORM}.installed") unless File.exist?(checkpoint) self.cook FileUtils.touch checkpoint end self.activate self end |
#port_path ⇒ Object
48 49 50 |
# File 'ext/extconf.rb', line 48 def port_path "#{target}/#{RUBY_PLATFORM}" end |