forked from larsch/ocra
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathocran-source.gemspec
More file actions
61 lines (49 loc) · 2.55 KB
/
ocran-source.gemspec
File metadata and controls
61 lines (49 loc) · 2.55 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# frozen_string_literal: true
require_relative "lib/ocran/version"
Gem::Specification.new do |spec|
spec.name = "ocran"
spec.version = Ocran::VERSION
spec.authors = ["Andi Idogawa", "shinokaro", "Lars Christensen"]
spec.email = ["andi@idogawa.com"]
spec.licenses = ["MIT"]
spec.summary = "OCRAN (One-Click Ruby Application Next) packages Ruby applications for distribution on Windows, Linux, and macOS."
spec.description = <<~DESC
OCRAN (One-Click Ruby Application Next) packages Ruby applications for
distribution. It bundles your script, the Ruby interpreter, gems, and native
libraries into a self-contained artifact that runs without requiring Ruby to
be installed on the target machine.
Three output formats are supported on all platforms:
- Self-extracting executable (.exe on Windows, native binary on Linux/macOS)
- Directory with a launch script (--output-dir)
- Zip archive with a launch script (--output-zip)
This is a fork of OCRA maintained for Ruby 3.2+ compatibility.
Migration guide: replace OCRA_EXECUTABLE with OCRAN_EXECUTABLE in your code.
Usage:
ocran helloworld.rb # builds helloworld.exe / helloworld
ocran --output-dir out/ app.rb
ocran --output-zip app.zip app.rb
See readme at https://github.com/largo/ocran
Report problems at https://github.com/largo/ocran/issues
DESC
spec.homepage = "https://github.com/largo/ocran"
spec.required_ruby_version = ">= 3.2.0"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/largo/ocran"
spec.metadata["changelog_uri"] = "https://github.com/largo/ocran/CHANGELOG.txt"
# Source gem: no platform set, ships C source and compiles the stub on install.
# RubyGems falls back to this when no binary gem matches the user's platform.
spec.extensions = ["ext/extconf.rb"]
spec.files = Dir.glob("{exe,lib}/**/*") +
Dir.glob("src/**/*.{c,h,rc,manifest,ico}") +
["src/Makefile"] +
["ext/extconf.rb"] +
# lzma.exe is a pre-built x86-64 Windows binary (not compiled from source).
# Include it so Windows users get compression support out of the box.
# On ARM64 Windows, x86-64 emulation makes it usable; use --no-lzma otherwise.
Dir.glob("share/ocran/lzma.exe") +
%w[README.md LICENSE.txt CHANGELOG.txt]
spec.bindir = "exe"
spec.executables = Dir.glob("exe/*").map { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_dependency "fiddle", "~> 1.0"
end