Sha256: c03654aad13e7e17e698b34fdd44a3c9baaf56852c2b1cb0fab6d4b7cbe8b02e

Contents?: true

Size: 1.48 KB

Versions: 15

Compression:

Stored size: 1.48 KB

Contents

# -*- encoding: UTF-8 -*-
require 'csd/application/minisip/unix/linux/debian'

module CSD
  module Application
    module Minisip
      class Ubuntu10 < Debian
        
        def after_aptitude
          create_working_directory
          fix_ubuntu_10_04
          super
        end
        
        def fix_ubuntu_10_04
          UI.info "Fixing broken Debian libraries (Ubuntu 10.04 only)".green.bold
          if Path.giomm_header_backup.file? and !Options.reveal
            UI.warn "giomm-2.4 seems to be fixed already, I won't touch it now. Delete #{Path.giomm_header_backup.enquote} to enforce it."
          else
            Path.new_giomm_header = File.join(Path.work, 'giomm.h')
            Cmd.copy(Path.giomm_header, Path.new_giomm_header)
            Cmd.replace Path.new_giomm_header do |r|
              r.replace '#include <giomm/socket.h>', "/* ----- AI COMMENTING OUT START ----- \n#include <giomm/socket.h>"
              r.replace '#include <giomm/tcpconnection.h>', "#include <giomm/tcpconnection.h>\n ----- AI COMMENTING OUT END ----- */"
            end
            # We cannot use Cmd.copy here, because Cmd.copy has no superuser privileges.
            # And since we are for sure on Ubuntu, these commands will work.
            Cmd.run "sudo cp #{Path.giomm_header} #{Path.giomm_header_backup}", :announce_pwd => false
            Cmd.run "sudo cp #{Path.new_giomm_header} #{Path.giomm_header}", :announce_pwd => false
          end
        end
        
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
csd-0.4.3 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.4.2 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.4.1 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.4.0 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.7 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.6 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.5 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.4 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.3 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.2 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.1 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.3.0 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.2.2 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.2.1 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb
csd-0.2.0 lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb