rake-debian-build 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@
3
3
  # Generate all the Rake tasks
4
4
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
5
5
  $hoe = Hoe.spec('rake-debian-build') do |p|
6
- p.version = '1.0.11'
6
+ p.version = '1.0.12'
7
7
  p.developer("Alban Peignier", "alban@tryphon.eu")
8
8
  p.summary = "Rake tasks to build debian packages"
9
9
  p.url = "http://projects.tryphon.eu/rake-debian-build"
@@ -1 +1,3 @@
1
- require 'config' if File.exists? 'config.rb'
1
+ ["#{ENV['HOME']}/.rake_debian_build.rc", "./local.rb", "./config.rb" ].each do |conf|
2
+ load conf if File.exists?(conf)
3
+ end
@@ -2,7 +2,15 @@ module Debian::Build
2
2
  class Platform
3
3
  extend BuildDirectoryMethods
4
4
 
5
- attr_reader :architecture
5
+ attr_reader :architecture, :distribution
6
+
7
+ @@repositories = []
8
+ def self.repositories
9
+ @@repositories
10
+ end
11
+ def repositories
12
+ @@repositories
13
+ end
6
14
 
7
15
  def method_missing(method, *args, &block)
8
16
  if @distribution.respond_to? method
@@ -48,15 +56,27 @@ module Debian::Build
48
56
  File.exists? pbuilder_base_file
49
57
  end
50
58
 
59
+ def additional_mirrors
60
+ repositories.collect do |repository|
61
+ case repository
62
+ when String
63
+ eval '"' + repository + '"'
64
+ when Proc
65
+ repository.call self
66
+ else
67
+ repository.to_s
68
+ end
69
+ end.compact.uniq
70
+ end
71
+
72
+ def other_mirrors
73
+ ["deb file:#{build_result_directory} ./"] + additional_mirrors
74
+ end
75
+
51
76
  def pbuilder(options = {})
52
77
  PBuilder.new do |p|
53
78
  p[:basetgz] = pbuilder_base_file
54
79
 
55
- other_mirrors = ["deb file:#{build_result_directory} ./"]
56
- unless @distribution.ubuntu?
57
- other_mirrors << "deb http://www.debian-multimedia.org #{distribution} main"
58
- end
59
-
60
80
  p[:othermirror] = "'#{other_mirrors.join('|')}'"
61
81
  p[:bindmounts] = p[:buildresult] = build_result_directory
62
82
  p[:distribution] = distribution
@@ -2,14 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rake-debian-build}
5
- s.version = "1.0.11"
5
+ s.version = "1.0.12"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alban Peignier"]
9
- s.date = %q{2010-09-22}
9
+ s.date = %q{2010-09-23}
10
10
  s.description = %q{}
11
11
  s.email = ["alban@tryphon.eu"]
12
- s.files = ["patching file Manifest.tmp"]
12
+ s.extra_rdoc_files = ["Manifest.txt"]
13
+ s.files = ["Manifest.txt", "README.rdoc", "Rakefile", "lib/debian/build.rb", "lib/debian/build/abstract_package.rb", "lib/debian/build/build_directory_methods.rb", "lib/debian/build/config.rb", "lib/debian/build/distribution.rb", "lib/debian/build/helper_methods.rb", "lib/debian/build/module_package.rb", "lib/debian/build/package.rb", "lib/debian/build/pbuilder.rb", "lib/debian/build/platform.rb", "lib/debian/build/source_providers.rb", "lib/debian/build/tasks.rb", "lib/debian/build/uploader.rb", "rake-debian-build.gemspec", "script/pbuilder", "spec/debian/build/pbuilder_spec.rb", "spec/debian/build/source_providers_spec.rb", "spec/debian/build/uploader_spec.rb", "spec/spec_helper.rb", "tasks/packages.rake", "tasks/pbuilder.rake", "tasks/setup.rake"]
13
14
  s.homepage = %q{http://projects.tryphon.eu/rake-debian-build}
14
15
  s.rdoc_options = ["--main", "README.txt"]
15
16
  s.require_paths = ["lib"]
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,12 @@
1
- require 'spec'
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems' unless ENV['NO_RUBYGEMS']
5
+ gem 'rspec'
6
+ require 'spec'
7
+ end
2
8
 
3
- lib_path = File.join(File.dirname(__FILE__),"..","lib")
4
- $:.unshift lib_path unless $:.include?(lib_path)
9
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
5
10
 
6
11
  require "debian/build"
7
12
  include Debian::Build
data/tasks/pbuilder.rake CHANGED
@@ -16,16 +16,20 @@ namespace :pbuilder do
16
16
  end
17
17
  task :create => Platform.all.collect { |platform| "create:#{platform.task_name}" }
18
18
 
19
+ def platforms_with_pbuilder
20
+ Debian::Build::Platform.all.select { |platform| platform.pbuilder_enabled? }
21
+ end
22
+
19
23
  desc "Update pbuilder"
20
24
  task :update do
21
- Debian::Build::Platform.each do |platform|
25
+ platforms_with_pbuilder.each do |platform|
22
26
  platform.pbuilder.exec :update
23
27
  end
24
28
  end
25
29
 
26
30
  desc "Update pbuilder by overriding config"
27
31
  task :update_config do
28
- Debian::Build::Platform.each do |platform|
32
+ platforms_with_pbuilder.each do |platform|
29
33
  platform.pbuilder("override-config" => true).exec :update
30
34
  end
31
35
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-debian-build
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 11
10
- version: 1.0.11
9
+ - 12
10
+ version: 1.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alban Peignier
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-22 00:00:00 +02:00
18
+ date: 2010-09-23 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency