2010-04-24 11:01:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libspotify <Formula
|
2010-11-21 13:32:58 +00:00
|
|
|
url 'http://developer.spotify.com/download/libspotify/libspotify-0.0.6-Darwin.zip'
|
|
|
|
version '0.0.6'
|
2010-04-24 11:01:44 +00:00
|
|
|
homepage 'http://developer.spotify.com/en/libspotify/overview/'
|
2010-11-21 13:32:58 +00:00
|
|
|
md5 'c4bbddf8a4e5e2ba3127728212228622'
|
2010-04-24 11:01:44 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
prefix.install 'share'
|
2010-04-07 05:58:35 +00:00
|
|
|
(include+'libspotify').install "libspotify.framework/Versions/#{version}/Headers/api.h"
|
2010-11-21 13:32:58 +00:00
|
|
|
lib.install "libspotify.framework/Versions/#{version}/libspotify" => 'libspotify.0.0.6.dylib'
|
2010-04-24 11:01:44 +00:00
|
|
|
doc.install Dir['doc/*']
|
|
|
|
|
|
|
|
cd lib
|
2010-11-21 13:32:58 +00:00
|
|
|
ln_s "libspotify.0.0.6.dylib", "libspotify.dylib"
|
2010-04-24 11:01:44 +00:00
|
|
|
|
2010-08-10 14:44:10 +00:00
|
|
|
system "install_name_tool", "-id",
|
2010-04-24 11:01:44 +00:00
|
|
|
"#{HOMEBREW_PREFIX}/lib/libspotify.#{version}.dylib",
|
|
|
|
"libspotify.dylib"
|
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
(lib+'pkgconfig/libspotify.pc').write pc_content
|
2010-04-24 11:01:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def pc_content; <<-EOS.undent
|
|
|
|
prefix=#{HOMEBREW_PREFIX}
|
|
|
|
exec_prefix=${prefix}
|
|
|
|
libdir=${exec_prefix}/lib
|
|
|
|
includedir=${prefix}/include
|
|
|
|
|
|
|
|
Name: libspotify
|
|
|
|
Description: Spotify client library
|
|
|
|
Version: #{version}
|
|
|
|
Libs: -L${libdir} -lspotify
|
|
|
|
Cflags: -I${includedir}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|