aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/lesspipe.rb
blob: b8804fbc22ac6ce3edb10c66147fe362a4ef89d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'formula'

class Lesspipe < Formula
  homepage 'http://www-zeuthen.desy.de/~friebel/unix/lesspipe.html'
  url 'http://sourceforge.net/projects/lesspipe/files/lesspipe/1.81/lesspipe-1.81.tar.gz'
  sha1 '0d6e0ed6465a9186f2d3e912aacafbb5569f8d44'

  option 'syntax-highlighting', 'Enable syntax highlighting'

  def install
    if build.include? 'syntax-highlighting'
      inreplace 'configure', %q{$ifsyntax = "\L$ifsyntax";}, %q{$ifsyntax = "\Ly";}
    end

    system "./configure", "--prefix=#{prefix}", "--default"
    man1.mkpath
    system "make install"
  end
end