fpm 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/fpm CHANGED
@@ -60,6 +60,10 @@ def main(args)
60
60
  settings.source_type = st
61
61
  end
62
62
 
63
+ opts.on("-S PACKAGE_SUFFIX", "which suffix to append to package and dependances") do |sfx|
64
+ settings.suffix = sfx
65
+ end
66
+
63
67
  opts.on("--prefix PREFIX",
64
68
  "A path to prefix files with when building the target package. This may not be necessary for all source types. For example, the 'gem' type will prefix with your gem directory (gem env | grep -A1 PATHS:)") do |prefix|
65
69
  settings.prefix = prefix
@@ -34,7 +34,8 @@ class FPM::Builder
34
34
  paths, root,
35
35
  :version => settings.version,
36
36
  :name => settings.package_name,
37
- :prefix => settings.prefix
37
+ :prefix => settings.prefix,
38
+ :suffix => settings.suffix
38
39
  )
39
40
 
40
41
  @paths = paths
@@ -28,6 +28,7 @@ class FPM::Source
28
28
  @paths = paths
29
29
  @root = root
30
30
 
31
+ self[:suffix] = params[:suffix]
31
32
  get_source(params)
32
33
  get_metadata
33
34
 
@@ -63,7 +63,7 @@ class FPM::Source::Gem < FPM::Source
63
63
  self[field] = spec.send(field)
64
64
  end
65
65
 
66
- self[:name] = "rubygem-#{spec.name}"
66
+ self[:name] = "rubygem#{self[:suffix]}-#{spec.name}"
67
67
  self[:maintainer] = spec.author
68
68
  self[:url] = spec.homepage
69
69
 
@@ -78,7 +78,7 @@ class FPM::Source::Gem < FPM::Source
78
78
  else
79
79
  reqs = dep.version_requirements
80
80
  end
81
- "rubygem-#{dep.name} #{reqs}"
81
+ "rubygem#{self[:suffix]}-#{dep.name} #{reqs}"
82
82
  end
83
83
  end # ::Gem::Package
84
84
  end # File.open (the gem)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fpm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jordan Sissel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-22 00:00:00 -08:00
18
+ date: 2011-02-07 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency