Skip to content

Instantly share code, notes, and snippets.

@bamchoh
Created June 8, 2013 09:52
Show Gist options
  • Save bamchoh/5734712 to your computer and use it in GitHub Desktop.
Save bamchoh/5734712 to your computer and use it in GitHub Desktop.
mrubyのminirakeで自作のbinファイルを作成する ref: http://qiita.com/bamchoh/items/5a36b006f6900f5ddca0
# 以下の記載を MRuby::Build.new のブロック内に記載する
conf.gem 'mrbgems/mruby-bin-hoge' #=> mrbgems下にあるとした場合の指定の仕方
# mhogeというbinファイルを作りたい場合
+- mruby-bin-hoge #=> ディレクトリ名はmrbgems.rake内の設定と一致させる(後述)
+- tools
| +- mhoge #=> ディレクトリ名はmrbgems.rake内の設定と一致させる(後述)
| |
| +- mhoge.c
|
+-mrbgem.rake
# Specification.new(自作binルートディレクトリ名) とすること
# spec.bins = %w(tools下ディレクトリ名) とすること
MRuby::Gem::Specification.new('mruby-bin-hoge') do |spec|
spec.license = 'MIT' #=> 自分の規定したライセンスにする?
spec.authors = '@bamchoh' #=> 作者の名前を記載する?
spec.bins = %w(mhoge)
end
# Specification.new(自作binルートディレクトリ名) とすること
# spec.bins = %w(tools下ディレクトリ名) とすること
MRuby::Gem::Specification.new('mruby-bin-hoge') do |spec|
spec.licence = 'MIT' #=> 自分の規定したライセンスにする?
spec.authors = '@bamchoh' #=> 作者の名前を記載する?
spec.bins = %w(mhoge)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment