Skip to content

Commit

Permalink
* Rakefile: build gems, install, uninstall, docs.
Browse files Browse the repository at this point in the history
 * COPYING: bsd license.
  • Loading branch information
_why committed May 3, 2006
1 parent 4c59871 commit 04b54cc
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
18 changes: 18 additions & 0 deletions COPYING
@@ -0,0 +1,18 @@
Copyright (c) 2006 why the lucky stiff

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 changes: 62 additions & 0 deletions Rakefile
@@ -0,0 +1,62 @@
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
include FileUtils

NAME = "parkplace"
VERSION = "1.0"
CLEAN.include ['**/.*.sw?', '*.gem', '.config']

Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.add ['README', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
end

desc "Packages up Park Place."
task :default => [:package]
task :package => [:clean]

spec =
Gem::Specification.new do |s|
s.name = NAME
s.version = VERSION
s.platform = Gem::Platform::RUBY
s.has_rdoc = true
s.extra_rdoc_files = [ "README" ]
s.summary = "a web file storage service, lovely with BitTorrent support."
s.description = s.summary
s.author = "why the lucky stiff"
s.executables = ['parkplace']

s.add_dependency('mongrel', '>= 0.3.12.5')
s.add_dependency('camping', '>= 1.4.1')
s.add_dependency('rubytorrent', '>= 0.3')
s.required_ruby_version = '>= 1.8.4'

s.files = %w(COPYING README Rakefile) +
Dir.glob("{bin,doc/rdoc,test,lib}/**/*") +
Dir.glob("ext/**/*.{h,c,rb}") +
Dir.glob("examples/**/*.rb") +
Dir.glob("tools/*.rb")

s.require_path = "lib"
# s.extensions = FileList["ext/**/extconf.rb"].to_a
s.bindir = "bin"
end

Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true
p.gem_spec = spec
end

task :install do
sh %{rake package}
sh %{sudo gem install pkg/#{NAME}-#{VERSION}}
end

task :uninstall => [:clean] do
sh %{sudo gem uninstall mongrel}
end

0 comments on commit 04b54cc

Please sign in to comment.