2010-04-24 11:01:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libspotify < Formula
|
2011-02-16 22:15:32 +00:00
|
|
|
url "http://developer.spotify.com/download/libspotify/libspotify-0.0.7-Darwin.zip"
|
|
|
|
version '0.0.7'
|
2010-04-24 11:01:44 +00:00
|
|
|
homepage 'http://developer.spotify.com/en/libspotify/overview/'
|
2011-02-16 22:15:32 +00:00
|
|
|
md5 '47e4d355b59aadbd7fad564f5fc172bf'
|
2010-04-24 11:01:44 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
prefix.install 'share'
|
2011-02-16 22:15:32 +00:00
|
|
|
(include+'libspotify').install "libspotify.framework/Versions/0.0.7/Headers/api.h"
|
|
|
|
lib.install "libspotify.framework/Versions/0.0.7/libspotify" => "libspotify.0.0.7.dylib"
|
2010-04-24 11:01:44 +00:00
|
|
|
doc.install Dir['doc/*']
|
|
|
|
|
|
|
|
cd lib
|
2011-02-16 22:15:32 +00:00
|
|
|
ln_s "libspotify.0.0.7.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-02-16 22:15:32 +00:00
|
|
|
"#{HOMEBREW_PREFIX}/lib/libspotify.0.0.7.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
|