Files
ptouch_label/ruby/libptouch.gemspec
knb c5c7c2ba52 ruby binding 追加
- FFI gem (libptouch)、exe ptouch-print-png(PNG のみ)
- ステータス 32 バイトを Hash に展開(parse_status / status_hash)
- CMake: libptouch 共有ライブラリ(ptouch_shared)
- RuboCop、gemspec(homepage / source_code_uri)

Made-with: Cursor
2026-04-12 16:06:50 +09:00

32 lines
1002 B
Ruby

# frozen_string_literal: true
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "libptouch/version"
Gem::Specification.new do |spec|
spec.name = "libptouch"
spec.version = Libptouch::VERSION
spec.authors = ["knb"]
spec.email = ["knb@artif.org"]
spec.summary = "FFI bindings for libptouch (Brother P-touch USB raster printing)"
spec.description = [
"Ruby wrapper around the ptouch_label C library libptouch.",
"Requires libptouch shared library (libusb, libpng)."
].join(" ")
spec.license = "MIT"
spec.required_ruby_version = ">= 3.0"
repo = "https://gitea.artif.org/knb/ptouch_label"
spec.homepage = repo
spec.metadata["source_code_uri"] = repo
spec.metadata["rubygems_mfa_required"] = "true"
spec.files = Dir.chdir(__dir__) { Dir["lib/**/*.rb", "exe/*", "README.md"] }
spec.bindir = "exe"
spec.executables = ["ptouch-print-png"]
spec.require_paths = ["lib"]
spec.add_dependency "ffi", "~> 1.15"
end