]> 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 ## remove hoe dependency entirely
7 class Hoe
8   def extra_dev_deps; @extra_dev_deps.reject { |x| x[0] == "hoe" } end
9 end
10
11 ## allow people who use development versions by running "rake gem"
12 ## and installing the resulting gem it to be able to do this. (gem
13 ## versions must be in dotted-digit notation only and can be passed
14 ## with the REL environment variable to "rake gem").
15 if ENV['REL']
16   version = ENV['REL']
17 else
18   version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION
19 end
20 Hoe.new('sup', version) do |p|
21   p.rubyforge_name = 'sup'
22   p.author = "William Morgan"
23   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.'
24   p.description = p.paragraphs_of('README.txt', 2..9).join("\n\n")
25   p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, "")
26   p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n")
27   p.email = "wmorgan-sup@masanjin.net"
28   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']
29 end
30
31 rule 'ss?.png' => 'ss?-small.png' do |t|
32 end
33
34 ## is there really no way to make a rule for this?
35 WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/NewUserGuide.txt www/main.css)
36
37 SCREENSHOTS = FileList["www/ss?.png"]
38 SCREENSHOTS_SMALL = []
39 SCREENSHOTS.each do |fn|
40   fn =~ /ss(\d+)\.png/
41   sfn = "www/ss#{$1}-small.png"
42   file sfn => [fn] do |t|
43     sh "cat #{fn} | pngtopnm | pnmscale -xysize 320 240 | pnmtopng > #{sfn}"
44   end
45   SCREENSHOTS_SMALL << sfn
46 end
47
48 task :upload_webpage => WWW_FILES do |t|
49   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
50 end
51
52 task :upload_webpage_images => (SCREENSHOTS + SCREENSHOTS_SMALL) do |t|
53   sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
54 end
55
56 # vim: syntax=ruby
57 # -*- ruby -*-
58 task :upload_report do |t|
59   sh "ditz html ditz"
60   sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
61 end