Class: PkgForge::DSL::Build
- Inherits:
-
Base
- Object
- Base
- PkgForge::DSL::Build
show all
- Defined in:
- lib/pkgforge/components/dirs.rb,
lib/pkgforge/base.rb,
lib/pkgforge/components/build.rb,
lib/pkgforge/components/configure.rb
Overview
Add configure flag options to Build DSL
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from PkgForge::Base
Instance Method Details
44
45
46
|
# File 'lib/pkgforge/components/build.rb', line 44
def configure(env = {})
run ['./configure'] + configure_flag_strings, default_env.merge(env)
end
|
28
29
30
31
32
|
# File 'lib/pkgforge/components/configure.rb', line 28
def configure_flag_strings
@forge.configure_flags.map do |flag, value|
"--#{flag}#{'=' if value}#{value}"
end
end
|
#install(env = {}) ⇒ Object
54
55
56
|
# File 'lib/pkgforge/components/build.rb', line 54
def install(env = {})
run "make DESTDIR=#{@forge.releasedir} install", default_env.merge(env)
end
|
#make(env = {}) ⇒ Object
49
50
51
|
# File 'lib/pkgforge/components/build.rb', line 49
def make(env = {})
run 'make', default_env.merge(env)
end
|
#releasedir ⇒ Object
45
46
47
|
# File 'lib/pkgforge/components/dirs.rb', line 45
def releasedir
@forge.tmpdir(:release)
end
|
#rm(paths) ⇒ Object
59
60
61
62
63
64
|
# File 'lib/pkgforge/components/build.rb', line 59
def rm(paths)
paths = [paths] if paths.is_a? String
paths.map { |x| File.join(@forge.releasedir, x) }
FileUtils.rm_r paths
nil
end
|
#run(*args) ⇒ Object
39
40
41
|
# File 'lib/pkgforge/components/build.rb', line 39
def run(*args)
@forge.run(*args)
end
|
#tmpdir(id) ⇒ Object
50
51
52
|
# File 'lib/pkgforge/components/dirs.rb', line 50
def tmpdir(id)
@forge.tmpdir(id)
end
|