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