Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jordansissel/fpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed Aug 20, 2011
2 parents 1833e94 + 08146b2 commit 8a46038
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/fpm/target/deb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions templates/deb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Expand Down

0 comments on commit 8a46038

Please sign in to comment.