Sha256: e1aa7fc16d53d0eeb7e1298e9d64f04dbc9aaee17341bc2f69d20056edb6f422

Contents?: true

Size: 630 Bytes

Versions: 5

Compression:

Stored size: 630 Bytes

Contents

require 'phut'
require 'tmpdir'

def openvswitch_srcdir
  File.join Phut.root, 'vendor/openvswitch-1.2.2.trema1'
end

desc 'Build Open vSwitch'
task openvswitch: Phut::OpenVswitch::OPENFLOWD

file Phut::OpenVswitch::OPENFLOWD do
  sh 'tar xzf ./vendor/openvswitch-1.2.2.trema1.tar.gz -C vendor'
  cd openvswitch_srcdir do
    sh "./configure --with-rundir=#{Dir.tmpdir}"
    sh 'make'
  end
end

task clean: 'openvswitch:clean'
task 'openvswitch:clean' do
  FileTest.exist?(openvswitch_srcdir) && cd(openvswitch_srcdir) do
    sh 'make clean'
  end
end

CLOBBER.include(openvswitch_srcdir) if FileTest.exists?(openvswitch_srcdir)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phut-0.2.4 tasks/openvswitch.rake
phut-0.2.3 tasks/openvswitch.rake
phut-0.2.2 tasks/openvswitch.rake
phut-0.2.0 tasks/openvswitch.rake
phut-0.1.0 tasks/openvswitch.rake