2010-04-24 11:01:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libspotify < Formula
|
2011-05-24 17:14:23 +00:00
|
|
|
url "http://developer.spotify.com/download/libspotify/libspotify-0.0.8-Darwin.zip"
|
|
|
|
version '0.0.8'
|
2010-04-24 11:01:44 +00:00
|
|
|
homepage 'http://developer.spotify.com/en/libspotify/overview/'
|
2011-05-24 17:14:23 +00:00
|
|
|
md5 'a59b824d36e689b7162d067d6e2497a7'
|
2010-04-24 11:01:44 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
prefix.install 'share'
|
2011-05-24 17:14:23 +00:00
|
|
|
(include+'libspotify').install "libspotify.framework/Versions/0.0.8/Headers/api.h"
|
|
|
|
lib.install "libspotify.framework/Versions/0.0.8/libspotify" => "libspotify.0.0.8.dylib"
|
2010-04-24 11:01:44 +00:00
|
|
|
doc.install Dir['doc/*']
|
|
|
|
|
|
|
|
cd lib
|
2011-05-24 17:14:23 +00:00
|
|
|
ln_s "libspotify.0.0.8.dylib", "libspotify.dylib"
|
2010-04-24 11:01:44 +00:00
|
|
|
|
2010-08-10 14:44:10 +00:00
|
|
|
system "install_name_tool", "-id",
|
2011-05-24 17:14:23 +00:00
|
|
|
"#{HOMEBREW_PREFIX}/lib/libspotify.0.0.8.dylib",
|
2010-04-24 11:01:44 +00:00
|
|
|
"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
|