File: Rakefile

package info (click to toggle)
libjson-ruby 0.4.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 268 kB
  • ctags: 329
  • sloc: ruby: 2,672; makefile: 13
file content (90 lines) | stat: -rw-r--r-- 2,133 bytes parent folder | download
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
require 'rake/gempackagetask'

require 'rbconfig'
include Config

PKG_NAME = 'json'
PKG_VERSION = File.read('VERSION').chomp
PKG_FILES = FileList["**/*"].exclude("CVS").exclude("pkg").exclude('coverage')

desc "Installing library"
task :install  do
    dest = CONFIG["sitelibdir"]
    install('lib/json.rb', dest)
    dest = File.join(dest, 'json')
    mkdir_p dest
    Dir['lib/json/*.*'].each do |f|
        install(f, dest)
    end
    dest = CONFIG["bindir"]
    install('bin/edit_json.rb', dest)
end

desc "Testing library"
task :test do
    ruby 'tests/runner.rb'
end

desc "Removing generated files"
task :clean do
  rm_rf 'doc'
end

# Create RDOC documentation.
task :doc do
    sh 'rdoc -d -S -o doc lib/json.rb lib/json/editor.rb'
end

spec = Gem::Specification.new do |s|
    #### Basic information.

    s.name = 'json'
    s.version = PKG_VERSION
    s.summary = "A JSON implementation in Ruby"
    s.description = ""

    #### Dependencies and requirements.

    #s.add_dependency('log4r', '> 1.0.4')
    #s.requirements << ""

    s.files = PKG_FILES

    #### C code extensions.

    #s.extensions << "ext/extconf.rb"

    #### Load-time details: library and application (you will need one or both).

    s.require_path = 'lib'                         # Use these for libraries.
    #s.autorequire = 'json'

    s.bindir = "bin"                               # Use these for applications.
    s.executables = ["edit_json.rb"]
    s.default_executable = "edit_json.rb"

    #### Documentation and testing.

    s.has_rdoc = true
    #s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
    #s.rdoc_options <<
    #  '--title' <<  'Rake -- Ruby Make' <<
    #  '--main' << 'README' <<
    #  '--line-numbers'
    s.test_files << 'tests/runner.rb'

    #### Author and project details.

    s.author = "Florian Frank"
    s.email = "flori@ping.de"
    s.homepage = "http://json.rubyforge.org"
    s.rubyforge_project = "json"
end

Rake::GemPackageTask.new(spec) do |pkg|
    pkg.need_tar = true
    pkg.package_files += PKG_FILES
end

task :release => [ :clean, :package ]
    # vim: set et sw=4 ts=4: