aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mad.rb
blob: a1d1f7e17953921006b24aec5cdddca77dff82a8 (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
32
33
require 'formula'

class Mad <Formula
  homepage 'http://www.underbit.com/products/mad/'
  url 'http://downloads.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz'
  md5 '1be543bc30c56fb6bea1d7bf6a64e66c'

  aka :libmad

  def mad_pc
    return <<-EOS
prefix=#{HOMEBREW_PREFIX}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG Audio Decoder
Version: #{@version}
Requires:
Conflicts:
Libs: -L${libdir} -lmad -lm
Cflags: -I${includedir}
    EOS
  end

  def install
    system "./configure --disable-debugging --enable-fpm=intel --prefix='#{prefix}'"
    system "make install"

    (lib+'pkgconfig'+'mad.pc').write mad_pc
  end
end