fpm 0.2.17 → 0.2.18
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/fpm +5 -0
- data/lib/fpm/builder.rb +4 -2
- data/lib/fpm/package.rb +5 -0
- data/templates/deb.erb +3 -0
- data/templates/rpm.erb +3 -0
- metadata +10 -10
data/bin/fpm
CHANGED
@@ -44,6 +44,11 @@ def main(args)
|
|
44
44
|
settings.dependencies << dep
|
45
45
|
end # --depends
|
46
46
|
|
47
|
+
opts.on("--provides PROVIDES") do |thing|
|
48
|
+
settings.provides ||= []
|
49
|
+
settings.provides << thing
|
50
|
+
end # --depends
|
51
|
+
|
47
52
|
opts.on("-a ARCHITECTURE", "--architecture ARCHITECTURE") do |arch|
|
48
53
|
settings.architecture = arch
|
49
54
|
end # --architecture
|
data/lib/fpm/builder.rb
CHANGED
@@ -38,7 +38,8 @@ class FPM::Builder
|
|
38
38
|
:prefix => settings.prefix,
|
39
39
|
:suffix => settings.suffix,
|
40
40
|
:exclude => settings.exclude,
|
41
|
-
:maintainer => settings.maintainer
|
41
|
+
:maintainer => settings.maintainer,
|
42
|
+
:provides => []
|
42
43
|
)
|
43
44
|
|
44
45
|
@edit = !!settings.edit
|
@@ -47,8 +48,9 @@ class FPM::Builder
|
|
47
48
|
@package = package_class_for(settings.package_type).new(@source)
|
48
49
|
# Append dependencies given from settings (-d flag for fpm)
|
49
50
|
@package.dependencies += settings.dependencies if settings.dependencies
|
51
|
+
# Append provides given from settings (--provides flag for fpm)
|
52
|
+
@package.provides += settings.provides if settings.provides
|
50
53
|
@package.architecture = settings.architecture if settings.architecture
|
51
|
-
#@package.epoch = settings.epoch # nil is OK
|
52
54
|
|
53
55
|
@output = settings.package_path
|
54
56
|
@recurse_dependencies = settings.recurse_dependencies
|
data/lib/fpm/package.rb
CHANGED
@@ -43,6 +43,10 @@ class FPM::Package
|
|
43
43
|
# Array of dependencies.
|
44
44
|
attr_accessor :dependencies
|
45
45
|
|
46
|
+
# Array of things this package provides.
|
47
|
+
# (Not all packages support this)
|
48
|
+
attr_accessor :provides
|
49
|
+
|
46
50
|
# a summary or description of the package
|
47
51
|
attr_accessor :summary
|
48
52
|
|
@@ -65,6 +69,7 @@ class FPM::Package
|
|
65
69
|
@maintainer = source[:maintainer] || "<#{ENV["USER"]}@#{Socket.gethostname}>"
|
66
70
|
@architecture = source[:architecture] || %x{uname -m}.chomp
|
67
71
|
@summary = source[:summary] || "no summary given"
|
72
|
+
@provides = source[:provides] || []
|
68
73
|
end # def initialize
|
69
74
|
|
70
75
|
def generate_specfile(builddir, paths)
|
data/templates/deb.erb
CHANGED
@@ -30,6 +30,9 @@ Maintainer: <%= maintainer or "<unknown>" %>
|
|
30
30
|
end
|
31
31
|
%>Depends: <%= properdeps.flatten.join(", ") %>
|
32
32
|
<% end %>
|
33
|
+
<% if !provides.empty? %>
|
34
|
+
Provides: <%= provides.join(", ") %>
|
35
|
+
<% end %>
|
33
36
|
Standards-Version: 3.9.1
|
34
37
|
Section: <%= category or "unknown" %>
|
35
38
|
Priority: extra
|
data/templates/rpm.erb
CHANGED
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 51
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 18
|
10
|
+
version: 0.2.18
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jordan Sissel
|
@@ -43,16 +43,16 @@ extra_rdoc_files: []
|
|
43
43
|
|
44
44
|
files:
|
45
45
|
- lib/fpm/builder.rb
|
46
|
-
- lib/fpm/namespace.rb
|
47
46
|
- lib/fpm/source.rb
|
48
47
|
- lib/fpm/rubyfixes.rb
|
49
|
-
- lib/fpm/source/npm.rb
|
50
|
-
- lib/fpm/source/dir.rb
|
51
|
-
- lib/fpm/source/rpm.rb
|
52
|
-
- lib/fpm/source/gem.rb
|
53
48
|
- lib/fpm/target/deb.rb
|
54
49
|
- lib/fpm/target/rpm.rb
|
55
50
|
- lib/fpm/package.rb
|
51
|
+
- lib/fpm/namespace.rb
|
52
|
+
- lib/fpm/source/dir.rb
|
53
|
+
- lib/fpm/source/rpm.rb
|
54
|
+
- lib/fpm/source/npm.rb
|
55
|
+
- lib/fpm/source/gem.rb
|
56
56
|
- lib/fpm.rb
|
57
57
|
- bin/fpm
|
58
58
|
- bin/fpm-npm
|
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
requirements: []
|
90
90
|
|
91
91
|
rubyforge_project:
|
92
|
-
rubygems_version: 1.
|
92
|
+
rubygems_version: 1.3.7
|
93
93
|
signing_key:
|
94
94
|
specification_version: 3
|
95
95
|
summary: fpm - package building and mangling
|