| 1 |
# coding: utf-8 |
| 2 |
# frozen_string_literal: true |
| 3 |
|
| 4 |
source_version = ["", "ext/fcntl/"].find do |dir| |
| 5 |
begin |
| 6 |
break File.open(File.join(__dir__, "#{dir}fcntl.c")) {|f| |
| 7 |
f.gets("\n#define FCNTL_VERSION ") |
| 8 |
f.gets[/\s*"(.+)"/, 1] |
| 9 |
} |
| 10 |
rescue Errno::ENOENT |
| 11 |
end |
| 12 |
end |
| 13 |
|
| 14 |
Gem::Specification.new do |spec| |
| 15 |
spec.name = "fcntl" |
| 16 |
spec.version = source_version |
| 17 |
spec.authors = ["Yukihiro Matsumoto"] |
| 18 |
spec.email = ["[email protected]"] |
| 19 |
|
| 20 |
spec.summary = "Loads constants defined in the OS fcntl.h C header file" |
| 21 |
spec.description = "Loads constants defined in the OS fcntl.h C header file" |
| 22 |
spec.homepage = "https://github.com/ruby/fcntl" |
| 23 |
spec.licenses = ["Ruby", "BSD-2-Clause"] |
| 24 |
|
| 25 |
spec.files = ["ext/fcntl/extconf.rb", "ext/fcntl/fcntl.c"] |
| 26 |
spec.bindir = "exe" |
| 27 |
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } |
| 28 |
spec.require_paths = ["lib"] |
| 29 |
spec.extensions = "ext/fcntl/extconf.rb" |
| 30 |
spec.required_ruby_version = ">= 2.3.0" |
| 31 |
end |