libspotify 12.1.51.1-universal-darwin → 12.1.51.3-universal-darwin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/README.md +36 -4
- data/Rakefile +51 -31
- data/lib/libspotify.rb +41 -1
- data/libspotify.gemspec +3 -3
- data/spec/libspotify_spec.rb +76 -0
- metadata +13 -37
- data/LICENSE.txt +0 -22
- data/libspotify.library +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2a24c521cee19a90b1bd295cfad102393da8ca99
|
4
|
+
data.tar.gz: 993047cc1a9552f1d5cc576a5663803717df7b11
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 09e057fe497e8dec426e88281a55223d2b70fed3c9cdb8b15a5ce15cf4fd80a40cfd3dbc0478f0d5c211a963779b7e6d55951e3f77e4686490a627b96f0d6888
|
7
|
+
data.tar.gz: cfdd805141e4858aabe956f7bec7b3259cd5d200ed4d96bc9c23af7c9fc160cb741d3f969cbeb7e90d8a6d610b90a86198ee1720cd44914161796b8570a06135
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
-Ilib
|
data/README.md
CHANGED
@@ -1,10 +1,42 @@
|
|
1
1
|
# libspotify
|
2
2
|
|
3
|
-
This is a mere ruby gem that bundles the libspotify binaries for ease of
|
3
|
+
This is a mere ruby gem that bundles the libspotify binaries for ease of
|
4
|
+
installation. If your platform is not supported, please create an issue in
|
5
|
+
[the issue tracker](https://github.com/Burgestrand/libspotify/issues).
|
4
6
|
|
5
7
|
Please see [the official libspotify documentation at https://developer.spotify.com/technologies/libspotify/ for more information](https://developer.spotify.com/technologies/libspotify/).
|
6
8
|
|
7
|
-
|
9
|
+
## Version policy
|
8
10
|
|
9
|
-
Given `12.1.51.0`, the `12.1.51` is the libspotify version, and the last `0`
|
10
|
-
of the libspotify gem for this libspotify
|
11
|
+
Given `12.1.51.0`, the `12.1.51` is the libspotify version, and the last `0`
|
12
|
+
means it’s the first version released of the libspotify gem for this libspotify
|
13
|
+
version.
|
14
|
+
|
15
|
+
## License
|
16
|
+
|
17
|
+
Copyright (c) 2012 Kim Burgestrand
|
18
|
+
|
19
|
+
MIT License
|
20
|
+
|
21
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
22
|
+
a copy of this software and associated documentation files (the
|
23
|
+
"Software"), to deal in the Software without restriction, including
|
24
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
25
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
26
|
+
permit persons to whom the Software is furnished to do so, subject to
|
27
|
+
the following conditions:
|
28
|
+
|
29
|
+
The above copyright notice and this permission notice shall be
|
30
|
+
included in all copies or substantial portions of the Software.
|
31
|
+
|
32
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
33
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
34
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
35
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
36
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
37
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
38
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
39
|
+
|
40
|
+
## License (libspotify)
|
41
|
+
|
42
|
+
libspotify is released under it’s own license and terms of use: http://developer.spotify.com/technologies/libspotify/#terms-of-use
|
data/Rakefile
CHANGED
@@ -1,58 +1,71 @@
|
|
1
1
|
desc "Build the libspotify gem for supported platforms"
|
2
2
|
task :build do
|
3
|
-
require
|
3
|
+
require "rubygems/package"
|
4
|
+
require "fileutils"
|
4
5
|
|
5
6
|
root = File.dirname(__FILE__)
|
6
|
-
bins = File.join(root,
|
7
|
-
pkgs = File.join(root,
|
7
|
+
bins = File.join(root, "bin/")
|
8
|
+
pkgs = File.join(root, "pkg/")
|
8
9
|
FileUtils.mkdir_p(pkgs, verbose: true)
|
9
10
|
|
10
11
|
# We want the right binary location.
|
11
|
-
require_relative
|
12
|
+
require_relative "lib/libspotify"
|
12
13
|
|
13
14
|
# Maps platform to libspotify binary name.
|
14
15
|
platforms =
|
15
16
|
{
|
16
|
-
"universal-darwin" => "
|
17
|
-
"i686-linux" => "
|
18
|
-
"x86_64-linux" => "
|
19
|
-
|
17
|
+
"universal-darwin" => %w"universal-darwin",
|
18
|
+
"i686-linux" => %w"i686-linux",
|
19
|
+
"x86_64-linux" => %w"x86_64-linux",
|
20
|
+
"arm-linux" => %w"armv5-linux",
|
21
|
+
"universal-java" => %w"universal-darwin i686-linux x86_64-linux armv5-linux",
|
22
|
+
Gem::Platform::RUBY => [], # fallback platform
|
20
23
|
}
|
21
24
|
|
22
|
-
#
|
23
|
-
|
25
|
+
# Maps binaries to system path.
|
26
|
+
binaries =
|
27
|
+
{
|
28
|
+
"universal-darwin" => "libspotify-12.1.51-Darwin-universal/libspotify.framework/Versions/Current/libspotify",
|
29
|
+
"i686-linux" => "libspotify-12.1.51-Linux-i686-release/lib/libspotify.so",
|
30
|
+
"x86_64-linux" => "libspotify-12.1.51-Linux-x86_64-release/lib/libspotify.so",
|
31
|
+
"armv5-linux" => "libspotify-12.1.51-Linux-armv5-release/lib/libspotify.so",
|
32
|
+
# armv5 works on both armv6 and armv7, so we always use armv5.
|
33
|
+
# "armv6-linux" => "libspotify-12.1.51-Linux-armv6-release/lib/libspotify.so",
|
34
|
+
# "armv7-linux" => "libspotify-12.1.51-Linux-armv7-release/lib/libspotify.so",
|
35
|
+
}
|
24
36
|
|
25
|
-
#
|
26
|
-
|
37
|
+
# Load our gem specification.
|
38
|
+
original = Gem::Specification.load("libspotify.gemspec")
|
27
39
|
|
28
40
|
# Now build the gem for each platform.
|
29
|
-
gempaths = platforms.each_pair.map do |platform,
|
41
|
+
gempaths = platforms.each_pair.map do |platform, source_binaries|
|
30
42
|
# Make sure we don’t break anything.
|
31
43
|
spec = original.dup
|
32
44
|
|
33
|
-
|
45
|
+
puts
|
46
|
+
puts "[#{platform}]"
|
34
47
|
spec.platform = platform
|
35
48
|
|
36
|
-
if
|
37
|
-
|
38
|
-
|
49
|
+
if source_binaries.empty?
|
50
|
+
puts "Pure ruby build."
|
51
|
+
spec.post_install_message = <<-MSG.gsub(/ {2,}/, " ")
|
52
|
+
Binary libspotify gem could not be installed. You will need to install libspotify separately.
|
53
|
+
If you are on ARM (e.g. Raspberry PI), you might want to install the gem with explicit --platform:
|
54
|
+
$> gem install libspotify --platform arm-linux
|
55
|
+
MSG
|
39
56
|
else
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
exit(false)
|
57
|
+
source_binaries.each do |binary|
|
58
|
+
src_name = "bin/#{binaries[binary]}"
|
59
|
+
dest_name = "bin/#{binary}"
|
60
|
+
FileUtils.cp(src_name, dest_name, verbose: true)
|
61
|
+
spec.files << dest_name
|
46
62
|
end
|
47
63
|
end
|
48
64
|
|
49
|
-
# Annoying.
|
50
|
-
Gem.configuration.verbose = false
|
51
|
-
|
52
65
|
# Move the build binary to the pkg/ directory.
|
53
|
-
gemname = Gem::
|
66
|
+
gemname = Gem::Package.build(spec)
|
54
67
|
File.join(pkgs, File.basename(gemname)).tap do |gempath|
|
55
|
-
FileUtils.mv(gemname, gempath)
|
68
|
+
FileUtils.mv(gemname, gempath, verbose: true)
|
56
69
|
end
|
57
70
|
end
|
58
71
|
|
@@ -61,12 +74,19 @@ task :build do
|
|
61
74
|
gempaths.each do |path|
|
62
75
|
puts " gem push pkg/#{File.basename(path)}"
|
63
76
|
end
|
64
|
-
|
77
|
+
|
78
|
+
puts
|
79
|
+
puts "Do not forget to tag and push to GitHub as well."
|
65
80
|
end
|
66
81
|
|
67
82
|
desc "Launch an IRB console with the gem loaded."
|
68
83
|
task :console do
|
69
|
-
exec
|
84
|
+
exec "irb -Ilib -rlibspotify"
|
85
|
+
end
|
86
|
+
|
87
|
+
require "rspec/core/rake_task"
|
88
|
+
RSpec::Core::RakeTask.new("spec") do |task|
|
89
|
+
task.ruby_opts = "-W2"
|
70
90
|
end
|
71
91
|
|
72
|
-
task :default => :
|
92
|
+
task :default => :spec
|
data/lib/libspotify.rb
CHANGED
@@ -1 +1,41 @@
|
|
1
|
-
|
1
|
+
module Libspotify
|
2
|
+
VERSION = "12.1.51"
|
3
|
+
GEM_VERSION = "#{VERSION}.3"
|
4
|
+
|
5
|
+
module_function
|
6
|
+
|
7
|
+
# @return [String] full path to libspotify binary.
|
8
|
+
def binary_path
|
9
|
+
File.expand_path("../bin/#{release_name}", File.dirname(__FILE__))
|
10
|
+
end
|
11
|
+
|
12
|
+
# @api private
|
13
|
+
# @return [String] name of libspotify binary.
|
14
|
+
def release_name
|
15
|
+
case RbConfig::CONFIG["host_os"]
|
16
|
+
when /darwin/
|
17
|
+
"universal-darwin"
|
18
|
+
when /linux/
|
19
|
+
case RbConfig::CONFIG["host_cpu"]
|
20
|
+
when /86_64/
|
21
|
+
"x86_64-linux"
|
22
|
+
when /86/
|
23
|
+
"i686-linux"
|
24
|
+
when /armv(\d+)?/
|
25
|
+
v = $1
|
26
|
+
hf = "hf" if hard_float?
|
27
|
+
"armv5#{hf}-linux"
|
28
|
+
end
|
29
|
+
else
|
30
|
+
"unknown-%s-%s" % RbConfig::CONFIG.values_at("host_cpu", "host_os")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# @api private
|
35
|
+
# @return [Boolean] true if on a hard floating point OS of arm
|
36
|
+
def hard_float?
|
37
|
+
`readelf -a #{RbConfig.ruby}`.match(/Tag_ABI_VFP_args/)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
LIBSPOTIFY_BIN = Libspotify.binary_path
|
data/libspotify.gemspec
CHANGED
@@ -6,12 +6,12 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.authors = ["Kim Burgestrand"]
|
7
7
|
gem.email = ["kim@burgestrand.se"]
|
8
8
|
gem.summary = %q{A binary ruby gem for distribution of libspotify.}
|
9
|
-
gem.description =
|
9
|
+
gem.description = gem.summary
|
10
10
|
gem.homepage = "https://github.com/Burgestrand/libspotify"
|
11
11
|
gem.require_paths = ["lib"]
|
12
12
|
gem.files = `git ls-files`.split($/)
|
13
|
-
gem.
|
13
|
+
gem.license = "MIT"
|
14
14
|
|
15
|
-
gem.version =
|
15
|
+
gem.version = Libspotify::GEM_VERSION
|
16
16
|
gem.platform = Gem::Platform::RUBY
|
17
17
|
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require "libspotify"
|
2
|
+
|
3
|
+
describe Libspotify do
|
4
|
+
describe "binary_path" do
|
5
|
+
subject(:release_name) { File.basename(Libspotify.binary_path) }
|
6
|
+
|
7
|
+
before do
|
8
|
+
os, cpu = example.description.split(":", 2)
|
9
|
+
stub_const("RbConfig::CONFIG", "host_os" => os, "host_cpu" => cpu)
|
10
|
+
end
|
11
|
+
|
12
|
+
specify "darwin:i686" do
|
13
|
+
release_name.should eq "universal-darwin"
|
14
|
+
end
|
15
|
+
|
16
|
+
specify "darwin:x86_64" do
|
17
|
+
release_name.should eq "universal-darwin"
|
18
|
+
end
|
19
|
+
|
20
|
+
specify "linux-gnu:i686" do
|
21
|
+
release_name.should eq "i686-linux"
|
22
|
+
end
|
23
|
+
|
24
|
+
specify "linux-gnu:x86_64" do
|
25
|
+
release_name.should eq "x86_64-linux"
|
26
|
+
end
|
27
|
+
|
28
|
+
context "soft float" do
|
29
|
+
before { Libspotify.stub(hard_float?: false) }
|
30
|
+
|
31
|
+
specify "linux-gnueabi:armv5l" do
|
32
|
+
release_name.should eq "armv5-linux"
|
33
|
+
end
|
34
|
+
|
35
|
+
specify "linux-gnueabi:armv6l" do
|
36
|
+
release_name.should eq "armv5-linux"
|
37
|
+
end
|
38
|
+
|
39
|
+
specify "linux-gnueabi:armv7l" do
|
40
|
+
release_name.should eq "armv5-linux"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context "hard float" do
|
45
|
+
before { Libspotify.stub(hard_float?: true) }
|
46
|
+
|
47
|
+
specify "linux-gnueabi:armv5l" do
|
48
|
+
release_name.should eq "armv5hf-linux"
|
49
|
+
end
|
50
|
+
|
51
|
+
specify "linux-gnueabi:armv6l" do
|
52
|
+
release_name.should eq "armv5hf-linux"
|
53
|
+
end
|
54
|
+
|
55
|
+
specify "linux-gnueabi:armv7l" do
|
56
|
+
release_name.should eq "armv5hf-linux"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
specify "weird-os:weird-cpu" do
|
61
|
+
release_name.should eq "unknown-weird-cpu-weird-os"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
specify "LIBSPOTIFY_BIN is equivalent to #binary_path" do
|
66
|
+
LIBSPOTIFY_BIN.should eq Libspotify.binary_path
|
67
|
+
end
|
68
|
+
|
69
|
+
specify "GEM_VERSION" do
|
70
|
+
Libspotify::GEM_VERSION.should eq "12.1.51.2"
|
71
|
+
end
|
72
|
+
|
73
|
+
specify "VERSION" do
|
74
|
+
Libspotify::VERSION.should eq "12.1.51"
|
75
|
+
end
|
76
|
+
end
|
metadata
CHANGED
@@ -1,35 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libspotify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.1.51.
|
5
|
-
prerelease:
|
4
|
+
version: 12.1.51.3
|
6
5
|
platform: universal-darwin
|
7
6
|
authors:
|
8
7
|
- Kim Burgestrand
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-07 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
description:
|
15
|
-
|
16
|
-
|
17
|
-
This is a mere ruby gem that bundles the libspotify binaries for ease of installation.
|
18
|
-
|
19
|
-
|
20
|
-
Please see [the official libspotify documentation at https://developer.spotify.com/technologies/libspotify/
|
21
|
-
for more information](https://developer.spotify.com/technologies/libspotify/).
|
22
|
-
|
23
|
-
|
24
|
-
# Version policy
|
25
|
-
|
26
|
-
|
27
|
-
Given `12.1.51.0`, the `12.1.51` is the libspotify version, and the last `0` means
|
28
|
-
it’s the first version released
|
29
|
-
|
30
|
-
of the libspotify gem for this libspotify version.
|
31
|
-
|
32
|
-
'
|
13
|
+
description: A binary ruby gem for distribution of libspotify.
|
33
14
|
email:
|
34
15
|
- kim@burgestrand.se
|
35
16
|
executables: []
|
@@ -37,42 +18,37 @@ extensions: []
|
|
37
18
|
extra_rdoc_files: []
|
38
19
|
files:
|
39
20
|
- .gitignore
|
21
|
+
- .rspec
|
40
22
|
- Gemfile
|
41
|
-
- LICENSE.txt
|
42
23
|
- README.md
|
43
24
|
- Rakefile
|
44
25
|
- bin/.gitkeep
|
45
26
|
- lib/libspotify.rb
|
46
27
|
- libspotify.gemspec
|
47
|
-
-
|
28
|
+
- spec/libspotify_spec.rb
|
29
|
+
- bin/universal-darwin
|
48
30
|
homepage: https://github.com/Burgestrand/libspotify
|
49
|
-
licenses:
|
31
|
+
licenses:
|
32
|
+
- MIT
|
33
|
+
metadata: {}
|
50
34
|
post_install_message:
|
51
35
|
rdoc_options: []
|
52
36
|
require_paths:
|
53
37
|
- lib
|
54
38
|
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
39
|
requirements:
|
57
|
-
- -
|
40
|
+
- - '>='
|
58
41
|
- !ruby/object:Gem::Version
|
59
42
|
version: '0'
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
hash: -685144165072869494
|
63
43
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
44
|
requirements:
|
66
|
-
- -
|
45
|
+
- - '>='
|
67
46
|
- !ruby/object:Gem::Version
|
68
47
|
version: '0'
|
69
|
-
segments:
|
70
|
-
- 0
|
71
|
-
hash: -685144165072869494
|
72
48
|
requirements: []
|
73
49
|
rubyforge_project:
|
74
|
-
rubygems_version:
|
50
|
+
rubygems_version: 2.0.3
|
75
51
|
signing_key:
|
76
|
-
specification_version:
|
52
|
+
specification_version: 4
|
77
53
|
summary: A binary ruby gem for distribution of libspotify.
|
78
54
|
test_files: []
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 Kim Burgestrand
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/libspotify.library
DELETED
Binary file
|