]> git.cworth.org Git - sup/blob - Rakefile
176031d4c1f61d53dae7db679f4edd4b9415a19e
[sup] / Rakefile
1 # -*- ruby -*-
2
3 require 'rubygems'
4 require 'hoe'
5 require 'sup'
6
7 class Hoe
8   def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end
9 end # thanks to "Mike H"
10
11 Hoe.new('sup', Redwood::VERSION) do |p|
12   p.rubyforge_name = 'sup'
13   p.author = "William Morgan"
14   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.'
15   p.description = p.paragraphs_of('README.txt', 2..9).join("\n\n")
16   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, "")
17   p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
18   p.email = "wmorgan-sup@masanjin.net"
19   p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', '>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.5']]
20 end
21
22 rule 'ss?.png' => 'ss?-small.png' do |t|
23 end
24
25 ## is there really no way to make a rule for this?
26 WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/UserGuide.txt www/main.css)
27
28 SCREENSHOTS = FileList["www/ss?.png"]
29 SCREENSHOTS_SMALL = []
30 SCREENSHOTS.each do |fn|
31   fn =~ /ss(\d+)\.png/
32   sfn = "www/ss#{$1}-small.png"
33   file sfn => [fn] do |t|
34     sh "cat #{fn} | pngtopnm | pnmscale -xysize 320 240 | pnmtopng > #{sfn}"
35   end
36   SCREENSHOTS_SMALL << sfn
37 end
38
39 task :upload_webpage => WWW_FILES do |t|
40   sh "scp -C #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
41 end
42
43 task :upload_webpage_images => (SCREENSHOTS + SCREENSHOTS_SMALL) do |t|
44   sh "scp -C #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
45 end
46
47 # vim: syntax=Ruby