From 6c2ec9e4bd3c55221c05ba8b0f9f0cad782fbcc3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 25 Aug 2013 00:58:14 +0000 Subject: more cleanups for packaging and documentation Rename COPYRIGHT -> COPYING, as that seems to be the more common name for the GPLv3 license file. Kill all rdoc, since I don't agree with HTML documentation and we do not expose any Ruby APIs. --- Rakefile | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 0774a09..105119c 100644 --- a/Rakefile +++ b/Rakefile @@ -44,7 +44,7 @@ require 'hoe' Hoe.plugin :git include Rake::DSL -Hoe.spec('dtas') do |p| +h = Hoe.spec('dtas') do |p| developer 'Eric Wong', 'e@80x24.org' self.readme_file = 'README' @@ -52,12 +52,16 @@ Hoe.spec('dtas') do |p| self.urls = %w(http://dtas.80x24.org/) self.summary = x = File.readlines("README")[0].split(/\s+/)[1].chomp self.description = self.paragraphs_of("README", 1) + # no public APIs, no HTML, either + self.need_rdoc = false + self.extra_rdoc_files = [] license "GPLv3+" end -task :publish_docs do +task :rsync_docs do dest = "80x24.org:/srv/dtas/" - system("rsync", "--files-from=.document", "-av", "#{Dir.pwd}/", dest) + system("rsync --chmod=Fugo=r --files-from=.rsync_doc -av ./ #{dest}") + system("rsync --chmod=Fugo=r -av ./Documentation/*.txt #{dest}") end task :coverage do @@ -71,3 +75,23 @@ task :coverage do require './test/covshow' exit status.exitstatus end + +base = "dtas-#{h.version}" +task tarball: "pkg/#{base}" do + Dir.chdir("pkg") do + tgz = "#{base}.tar.gz" + tmp = "#{tmp}.#$$" + cmd = "tar cf - #{base} | gzip -9 > #{tmp}" + system(cmd) or abort "#{cmd}: #$?" + File.rename(tmp, tgz) + end +end + +task dist: [ :tarball, :package ] do + Dir.chdir("pkg") do + %w(dtas-linux dtas-mpris).each do |gem| + cmd = "gem build ../#{gem}.gemspec" + system(cmd) or abort "#{cmd}: #$?" + end + end +end -- cgit v1.2.3-24-ge0c7