Sha256: 0a7f8de5a899931d13f8e20056b47a667dc71234b7a9f3e19f08ed7310f2a9f1

Contents?: true

Size: 856 Bytes

Versions: 1

Compression:

Stored size: 856 Bytes

Contents

node.reverse_merge!(
  tig: {
    prefix:  "/usr/local",
    src:     "/usr/local/src",
    scheme:  "https",
  },
)

package "git"
package "gcc"
package "automake"
package "make"

case node[:platform]
when "debian", "ubuntu"
  package "libncursesw5-dev"
  package "pkg-config"
when 'redhat', "amazon"
  package "ncurses-devel"
  package "which"
end

tig_dir = "#{node[:tig][:src]}/tig"

git tig_dir do
  repository "#{node[:tig][:scheme]}://github.com/jonas/tig.git"
  revision   "tig-#{node[:tig][:version]}" if node[:tig][:version]
end

[
  "make configure",
  "./configure",
  "make clean",
  "make prefix=#{node[:tig][:prefix]}",
  "make install prefix=#{node[:tig][:prefix]}",
].each do |command|
  execute command do
    cwd     tig_dir
    not_if "#{node[:tig][:prefix]}/bin/tig -v | grep #{node[:tig][:version]}" if node[:tig][:version]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
itamae-plugin-recipe-tig-0.1.5 lib/itamae/plugin/recipe/tig/default.rb