aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/cdargs.rb
blob: 3a90cfcae51601cdea84d72a5af94e9d21ba4a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'formula'

class Cdargs < Formula
  url 'http://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz'
  homepage 'http://www.skamphausen.de/cgi-bin/ska/CDargs'
  md5 '50be618d67f0b9f2439526193c69c567'

  fails_with_llvm "Bus error in ld on SL 10.6.4"

  def install
    system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"
    system "make"
    system "make install-strip"

    rm Dir['contrib/Makefile*']
    prefix.install 'contrib'

    bash_completion_dir = etc+'bash_completion.d'
    bash_completion_dir.mkpath
    ln_sf prefix+'contrib/cdargs-bash.sh', bash_completion_dir+'cdargs-bash.sh'
  end

  def caveats; <<-EOS
Support files for bash, tcsh and emacs are located in #{prefix}/contrib.
The file for bash is also symlinked to #{etc}/bash_completion.d/cdargs-bash.sh. Source it from
your .bash_profile or .bashrc to get nice aliases and bash completion.

Consult the cdargs man page for more details and instructions.
    EOS
  end
end