Top Level Namespace

Defined Under Namespace

Modules: GPGME

Constant Summary collapse

CWD =
File.expand_path(File.dirname(__FILE__))
PREFIX =
"#{CWD}/dst/"

Instance Method Summary collapse

Instance Method Details

#build(tgz, *flags) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'ext/gpgme/extconf.rb', line 16

def build(tgz, *flags)
  sys("tar xjvf #{tgz}")

  Dir.chdir(File.basename(tgz, '.tar.bz2')) do
    sys("./configure --prefix=#{PREFIX} --disable-shared --enable-static --with-pic", *flags)
    sys("make")
    sys("make install")
  end
end

#sys(*cmd) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'ext/gpgme/extconf.rb', line 6

def sys(*cmd)
  puts "  -- #{cmd.join(' ')}"

  unless ret = xsystem(cmd.join(' '))
    raise "#{cmd.join(' ')} failed!"
  end

  ret
end