Rakefile in pkg-config-1.1.1 vs Rakefile in pkg-config-1.1.2

- old
+ new

@@ -1,7 +1,9 @@ # -*- coding: utf-8; mode: ruby -*- # +# Copyright (C) 2010-2011 Kouhei Sutou <kou@clear-code.com> +# # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # @@ -17,11 +19,11 @@ require 'English' require 'pathname' require 'fileutils' require 'rubygems' -require 'hoe' +require 'jeweler' base_dir = Pathname(__FILE__).dirname lib_dir = base_dir + "lib" $LOAD_PATH.unshift(lib_dir.to_s) @@ -29,25 +31,32 @@ require 'pkg-config' PKGConfig::VERSION end ENV["VERSION"] ||= guess_version -version = ENV["VERSION"] -project = Hoe.spec('pkg-config') do |project| - project.version = version - project.rubyforge_name = 'cairo' - project.author = "Kouhei Sutou" - project.readme_file = "README.rdoc" - project.email = ['kou@cozmixng.org'] - project.summary = 'A pkg-config implmenetation by Ruby' - project.url = 'http://github.com/rcairo/pkg-config' - project.spec_extras = { - :require_paths => ['lib'], - :has_rdoc => false, - } - news = base_dir + "NEWS" - project.changes = news.read.split(/^== .*$/)[1].strip - project.description = "A pkg-cofnig implementation by Ruby" +version = ENV["VERSION"].dup +spec = nil +Jeweler::Tasks.new do |_spec| + spec = _spec + spec.name = "pkg-config" + spec.version = version + spec.rubyforge_project = 'cairo' + spec.author = "Kouhei Sutou" + spec.email = ['kou@cozmixng.org'] + spec.summary = 'A pkg-config implementation for Ruby' + spec.homepage = 'http://github.com/rcairo/pkg-config' + spec.description = "pkg-config can be used in your extconf.rb to properly detect need libraries for compiling Ruby native extensions" + spec.license = "LGPLv2+" + spec.files = FileList["lib/**/*.rb", + "*.rb", + "Gemfile", + "Rakefile", + "LGPL-2.1"] + spec.test_files = FileList["test/**/*.rb"] +end + +Rake::Task["release"].prerequisites.clear +Jeweler::RubygemsDotOrgTasks.new do end desc "tag the current veresion" task :tag do sh("git", "tag", "-a", version.to_s, "-m", "release #{version}!!!")