Sha256: 4f010fb32c28c0316b65b85916f9c16e3af628f71f39a64777057d9ffe960c3c
Contents?: true
Size: 1.89 KB
Versions: 2
Compression:
Stored size: 1.89 KB
Contents
# -*- ruby -*- require 'find' require 'rubygems' require 'rake/extensiontask' task :default => :build def version @version ||= ENV["VERSION"] || guess_version end def guess_version versions = {} File.open("ext/glib2/rbglib.h") do |rbglib_h| rbglib_h.each_line do |line| if /#define\s+RBGLIB_([A-Z]+)_VERSION\s+(\d+)/ =~ line versions[$1.downcase] = $2.to_i end end end ["major", "minor", "micro"].collect {|type| versions[type]}.compact.join(".") end package_name = "glib2" spec = Gem::Specification.new do |s| s.name = package_name s.summary = "Ruby/GLib2 is a Ruby binding of GLib-2.x." s.description = "Ruby/GLib2 is a Ruby binding of GLib-2.x." s.author = "The Ruby-GNOME2 Proejct Team" s.email = "ruby-gnome2-devel-en@lists.sourceforge.net" s.homepage = "http://ruby-gnome2.sourceforge.jp/" s.version = version s.platform = Gem::Platform::RUBY s.extensions = FileList["ext/#{package_name}/extconf.rb"] s.require_paths = ["lib"] s.files = FileList["ChangeLog", "README", "Rakefile", "extconf.rb", "lib/**/*.rb", "{ext,sample,test,test-unit}/**/*"] end Rake::GemPackageTask.new(spec) do |pkg| end Rake::ExtensionTask.new(package_name, spec) do |ext| ext.cross_compile = true ext.cross_compiling do |spec| if /mingw|mswin/ =~ spec.platform.to_s win32_dir = File.join("vendor", "local") win32_files = [] Find.find(win32_dir) do |file| next if /\.zip\z/ =~ file win32_files << file end spec.files += win32_files end end end namespace :win32 do desc "download Windows binaries" task :download do base_dir = File.join(File.dirname(__FILE__), "lib") $LOAD_PATH.unshift(base_dir) require 'gnome2-win32-binary-downloader' GNOME2Win32BinaryDownloader.download(:package => "glib", :dependencies => ["gettext-runtime"]) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
glib2-0.90.2 | Rakefile |
glib2-0.90.2-x86-mingw32 | Rakefile |