libspotify 12.1.51.3-universal-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f0a0439010ceced0112eb86478ea613389532501
4
+ data.tar.gz: 494714b8a7b2d5d492926e0316b3bf3db029c0af
5
+ SHA512:
6
+ metadata.gz: 3807118503a20739438ce804717e713987702deb90e655767d1f8174be5b2f3b94e4f03ee24d038020dfc999566410d0ad032862120d2ba36969eef8482250a7
7
+ data.tar.gz: a61161c736f03fe0c87a0534e1013fd8b993a8f02b81efdc398f5e5ae9c93971bcdcc03fdbc594152eebaf30d89070de01927b7f953a28becbf1454408487b79
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ bin/
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ -Ilib
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # libspotify
2
+
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).
6
+
7
+ Please see [the official libspotify documentation at https://developer.spotify.com/technologies/libspotify/ for more information](https://developer.spotify.com/technologies/libspotify/).
8
+
9
+ ## Version policy
10
+
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 ADDED
@@ -0,0 +1,92 @@
1
+ desc "Build the libspotify gem for supported platforms"
2
+ task :build do
3
+ require "rubygems/package"
4
+ require "fileutils"
5
+
6
+ root = File.dirname(__FILE__)
7
+ bins = File.join(root, "bin/")
8
+ pkgs = File.join(root, "pkg/")
9
+ FileUtils.mkdir_p(pkgs, verbose: true)
10
+
11
+ # We want the right binary location.
12
+ require_relative "lib/libspotify"
13
+
14
+ # Maps platform to libspotify binary name.
15
+ platforms =
16
+ {
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
23
+ }
24
+
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
+ }
36
+
37
+ # Load our gem specification.
38
+ original = Gem::Specification.load("libspotify.gemspec")
39
+
40
+ # Now build the gem for each platform.
41
+ gempaths = platforms.each_pair.map do |platform, source_binaries|
42
+ # Make sure we don’t break anything.
43
+ spec = original.dup
44
+
45
+ puts
46
+ puts "[#{platform}]"
47
+ spec.platform = platform
48
+
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
56
+ else
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
62
+ end
63
+ end
64
+
65
+ # Move the build binary to the pkg/ directory.
66
+ gemname = Gem::Package.build(spec)
67
+ File.join(pkgs, File.basename(gemname)).tap do |gempath|
68
+ FileUtils.mv(gemname, gempath, verbose: true)
69
+ end
70
+ end
71
+
72
+ puts
73
+ puts "All gems successfully built. To publish, do:"
74
+ gempaths.each do |path|
75
+ puts " gem push pkg/#{File.basename(path)}"
76
+ end
77
+
78
+ puts
79
+ puts "Do not forget to tag and push to GitHub as well."
80
+ end
81
+
82
+ desc "Launch an IRB console with the gem loaded."
83
+ task :console do
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"
90
+ end
91
+
92
+ task :default => :spec
data/bin/.gitkeep ADDED
@@ -0,0 +1 @@
1
+ You place libspotify binaries in this directory for gem building.
data/bin/armv5-linux ADDED
Binary file
data/bin/i686-linux ADDED
Binary file
Binary file
data/bin/x86_64-linux ADDED
Binary file
data/lib/libspotify.rb ADDED
@@ -0,0 +1,41 @@
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
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ require File.expand_path('../lib/libspotify', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = "libspotify"
6
+ gem.authors = ["Kim Burgestrand"]
7
+ gem.email = ["kim@burgestrand.se"]
8
+ gem.summary = %q{A binary ruby gem for distribution of libspotify.}
9
+ gem.description = gem.summary
10
+ gem.homepage = "https://github.com/Burgestrand/libspotify"
11
+ gem.require_paths = ["lib"]
12
+ gem.files = `git ls-files`.split($/)
13
+ gem.license = "MIT"
14
+
15
+ gem.version = Libspotify::GEM_VERSION
16
+ gem.platform = Gem::Platform::RUBY
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 ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: libspotify
3
+ version: !ruby/object:Gem::Version
4
+ version: 12.1.51.3
5
+ platform: universal-java
6
+ authors:
7
+ - Kim Burgestrand
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-04-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A binary ruby gem for distribution of libspotify.
14
+ email:
15
+ - kim@burgestrand.se
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - .gitignore
21
+ - .rspec
22
+ - Gemfile
23
+ - README.md
24
+ - Rakefile
25
+ - bin/.gitkeep
26
+ - lib/libspotify.rb
27
+ - libspotify.gemspec
28
+ - spec/libspotify_spec.rb
29
+ - bin/universal-darwin
30
+ - bin/i686-linux
31
+ - bin/x86_64-linux
32
+ - bin/armv5-linux
33
+ homepage: https://github.com/Burgestrand/libspotify
34
+ licenses:
35
+ - MIT
36
+ metadata: {}
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubyforge_project:
53
+ rubygems_version: 2.0.3
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: A binary ruby gem for distribution of libspotify.
57
+ test_files: []