mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-27 03:19:46 -05:00
* Use new "url" features * Use keg_only DSL * Use "skip_clean :all" DSL * Whitespace and style cleanups * Make bash invocations less silly * Use new man2-man8 helpers * Remove "FileUtils." since it is included in Formula * Use real names for deps instead of aliases * ENV.x11 now updates path, so remove that from individual brews
40 lines
1.1 KiB
Ruby
40 lines
1.1 KiB
Ruby
require 'formula'
|
|
|
|
class Libspotify <Formula
|
|
url 'http://developer.spotify.com/download/libspotify/libspotify-0.0.4-darwin.zip'
|
|
version '0.0.4'
|
|
homepage 'http://developer.spotify.com/en/libspotify/overview/'
|
|
md5 'a97552130df26b1aa2228adcf8d4210b'
|
|
|
|
def install
|
|
prefix.install 'share'
|
|
(include+'libspotify').install "libspotify.framework/Versions/#{version}/Headers/api.h"
|
|
(include+'libspotify').install "libspotify.framework/Versions/#{version}/libspotify" => 'libspotify.0.0.4.dylib'
|
|
doc.install Dir['doc/*']
|
|
|
|
cd lib
|
|
ln_s "libspotify.0.0.4.dylib", "libspotify.dylib"
|
|
|
|
system "install_name_tool",
|
|
"-id",
|
|
"#{HOMEBREW_PREFIX}/lib/libspotify.#{version}.dylib",
|
|
"libspotify.dylib"
|
|
|
|
(lib+'pkgconfig/libspotify.pc').write pc_content
|
|
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
|