2010-04-24 11:01:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Libspotify < Formula
|
2010-04-24 11:01:44 +00:00
|
|
|
homepage 'http://developer.spotify.com/en/libspotify/overview/'
|
2012-06-17 12:43:17 +00:00
|
|
|
url 'https://developer.spotify.com/download/libspotify/libspotify-12.1.51-Darwin-universal.zip'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '5a02b7af804661ebff0f4db01a85e91635de8fb3'
|
2010-04-24 11:01:44 +00:00
|
|
|
|
|
|
|
def install
|
2012-06-17 12:43:17 +00:00
|
|
|
(include+'libspotify').install "libspotify.framework/Versions/12.1.51/Headers/api.h"
|
|
|
|
lib.install "libspotify.framework/Versions/12.1.51/libspotify" => "libspotify.12.1.51.dylib"
|
2011-11-01 13:58:43 +00:00
|
|
|
doc.install Dir['docs/*']
|
2012-05-23 19:43:50 +00:00
|
|
|
doc.install %w(ChangeLog README LICENSE licenses.xhtml examples)
|
2011-11-01 13:58:43 +00:00
|
|
|
man3.install Dir['man3/*']
|
2010-04-24 11:01:44 +00:00
|
|
|
|
2012-09-04 15:49:14 +00:00
|
|
|
lib.cd do
|
|
|
|
ln_s "libspotify.12.1.51.dylib", "libspotify.dylib"
|
|
|
|
ln_s "libspotify.12.1.51.dylib", "libspotify.12.dylib"
|
|
|
|
end
|
2010-04-24 11:01:44 +00:00
|
|
|
|
2013-03-25 02:09:38 +00:00
|
|
|
(lib+'pkgconfig/libspotify.pc').write pc_file
|
2010-04-24 11:01:44 +00:00
|
|
|
end
|
|
|
|
|
2013-03-25 02:09:38 +00:00
|
|
|
def pc_file; <<-EOS.undent
|
|
|
|
prefix=#{opt_prefix}
|
2010-04-24 11:01:44 +00:00
|
|
|
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
|