Skip to content
Browse files

Merge branch 'master' of github.com:jordansissel/fpm

  • Loading branch information...
2 parents 1833e94 + 08146b2 commit 8a46038742fb4cc7d6c743391eca374dd4de79ee @jordansissel committed
Showing with 12 additions and 0 deletions.
  1. +8 −0 lib/fpm/target/deb.rb
  2. +4 −0 templates/deb.erb
View
8 lib/fpm/target/deb.rb
@@ -13,6 +13,10 @@ def self.flags(opts, settings)
"For = dependencies, allow iterations on the specified version. Default is to be specific.") do |x|
settings.target[:ignore_iteration] = true
end
+
+ opts.on("--pre-depends DEPENDENCY", "Add DEPENDENCY as Pre-Depends.") do |dep|
+ (settings.target[:pre_depends] ||= []) << dep
+ end
end
def needs_md5sums
@@ -150,4 +154,8 @@ def fix_dependency(dep)
return dep
end
end # def fix_dependency
+
+ def pre_dependencies
+ self.settings[:pre_depends] || []
+ end # def pre_dependencies
end # class FPM::Target::Deb
View
4 templates/deb.erb
@@ -6,6 +6,10 @@ Maintainer: <%= maintainer or "<unknown>" %>
<% properdeps = dependencies.collect { |d| fix_dependency(d) }.flatten -%>
Depends: <%= properdeps.flatten.join(", ") %>
<% end -%>
+<% if !pre_dependencies.empty? -%>
+<% properpredeps = pre_dependencies.collect { |d| fix_dependency(d) }.flatten -%>
+Pre-Depends: <%= properpredeps.flatten.join(", ") %>
+<% end -%>
<% if !conflicts.empty? -%>
Conflicts: <%= conflicts.join(", ") %>
<% end -%>

0 comments on commit 8a46038

Please sign in to comment.
Something went wrong with that request. Please try again.