-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassimp.gemspec
More file actions
42 lines (37 loc) · 1.65 KB
/
Copy pathassimp.gemspec
File metadata and controls
42 lines (37 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# frozen_string_literal: true
require_relative "lib/assimp/version"
require_relative "lib/assimp/native/platform"
Gem::Specification.new do |spec|
spec.name = "assimp-ruby"
spec.version = Assimp::VERSION
spec.authors = ["Yudai Takada"]
spec.email = ["t.yudai92@gmail.com"]
spec.summary = "Ruby bindings for the Assimp asset import library"
spec.description = "A Ruby-friendly 3D asset import API backed by Assimp 5.x and FFI."
spec.homepage = "https://github.com/ydah/assimp-ruby"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.2.0"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/main"
spec.metadata["rubygems_mfa_required"] = "true"
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
gemspec = File.basename(__FILE__)
platform_gem = ENV["ASSIMP_RUBY_PLATFORM_GEM"] == "1"
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?(*%w[bin/ Gemfile .gitignore .rspec spec/ .github/])
end
end
if platform_gem
native_platform = Assimp::Native::Platform.tag
spec.platform = Gem::Platform.new(native_platform)
spec.files.reject! { |file| file.start_with?("generator/") }
spec.files.concat Dir[File.join(__dir__, "lib", "assimp", "native", native_platform, "*")]
.select { |file| File.file?(file) }
.map { |file| file.delete_prefix("#{__dir__}/") }
end
spec.require_paths = ["lib"]
spec.add_dependency "ffi", "~> 1.17"
end