public
Description: ruby binding to maxmind geoip library
Homepage: http://geoip-city.rubyforge.org
Clone URL: git://github.com/ry/geoip-city.git
Search Repo:
geoip-city / Rakefile
100644 47 lines (39 sloc) 1.289 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/gempackagetask'
 
task :default => [:compile, :test]
 
CLEAN.add "geoip_city.{o,bundle,so,obj,pdb,lib,def,exp}"
CLOBBER.add ['Makefile', 'mkmf.log','doc']
 
Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_files.add ['README', 'geoip_city.c']
  rdoc.main = "README" # page to start on
  rdoc.rdoc_dir = 'doc/' # rdoc output folder
end
 
Rake::TestTask.new do |t|
  t.test_files = 'test.rb'
  t.verbose = true
end
 
spec = Gem::Specification.new do |s|
  s.name = 'geoip_city'
  s.author = 'ry dahl'
  s.email = 'ry@tinyclouds.org'
  s.version = "0.2.0"
  s.summary = "A Binding to the GeoIP C library"
  s.homepage = "http://geoip_city.rubyforge.org"
  s.files = FileList['Rakefile', '*.rb', '*.c', 'README*']
  s.test_files = 'test.rb'
  s.extensions = 'extconf.rb'
  s.require_path = '.'
end
 
Rake::GemPackageTask.new(spec) do |p|
  p.need_tar = true
  p.gem_spec = spec
end
 
desc 'compile the extension'
task(:compile => 'Makefile') { sh 'make' }
file('Makefile' => "geoip_city.c") { ruby 'extconf.rb' }
 
task(:webpage) do
  sh 'scp -r doc/* rydahl@rubyforge.org:/var/www/gforge-projects/geoip-city/'
end