]> git.cworth.org Git - sup/blob - Rakefile
Merge commit 'origin/color'
[sup] / Rakefile
1 require 'rubygems'
2 require 'hoe'
3 $:.unshift 'lib' # force loading from ./lib/ if it exists
4 require 'sup'
5
6 class Hoe
7   def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end
8 end # thanks to "Mike H"
9
10 ## allow people who use development versions by running "rake gem"
11 ## and installing the resulting gem it to be able to do this. (gem
12 ## versions must be in dotted-digit notation only and can be passed
13 ## with the REL environment variable to "rake gem").
14 if ENV['REL']
15   version = ENV['REL']
16 else
17   version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
18 end
19 Hoe.new('sup', version) do |p|
20   p.rubyforge_name = 'sup'
21   p.author = "William Morgan"
22   p.summary = 'A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.'
23   p.description = p.paragraphs_of('README.txt', 2..9).join("\n\n")
24   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, "")
25   p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
26   p.email = "wmorgan-sup@masanjin.net"
27   p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', '>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 'mime-types', 'gettext', 'fastthread']
28 end
29
30 rule 'ss?.png' => 'ss?-small.png' do |t|
31 end
32
33 ## is there really no way to make a rule for this?
34 WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/NewUserGuide.txt www/main.css)
35
36 SCREENSHOTS = FileList["www/ss?.png"]
37 SCREENSHOTS_SMALL = []
38 SCREENSHOTS.each do |fn|
39   fn =~ /ss(\d+)\.png/
40   sfn = "www/ss#{$1}-small.png"
41   file sfn => [fn] do |t|
42     sh "cat #{fn} | pngtopnm | pnmscale -xysize 320 240 | pnmtopng > #{sfn}"
43   end
44   SCREENSHOTS_SMALL << sfn
45 end
46
47 task :upload_webpage => WWW_FILES do |t|
48   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
49 end
50
51 task :upload_webpage_images => (SCREENSHOTS + SCREENSHOTS_SMALL) do |t|
52   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
53 end
54
55 # vim: syntax=ruby
56 # -*- ruby -*-
57 task :upload_report do |t|
58   sh "ditz html ditz"
59   sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
60 end