Permalink
Browse files

Merge pull request #289 from dnbert/master

Adding feature: --no-depends flag for deb and rpm
  • Loading branch information...
2 parents f77b662 + b480fe6 commit 02e0868d41dac57d39b4c00c132ad66423a65238 @jordansissel committed Nov 15, 2012
Showing with 6 additions and 1 deletion.
  1. +3 −0 lib/fpm/command.rb
  2. +1 −1 templates/deb.erb
  3. +2 −0 templates/rpm.erb
View
@@ -62,6 +62,9 @@ class FPM::Command < Clamp::Command
@dependencies << val
end # -d / --depends
+ option "--no-depends", :flag, "Do not list any dependencies in this package",
+ :default => false
+
option "--provides", "PROVIDES",
"What this package provides (usually a name). This flag can be "\
"specified multiple times." do |val|
View
@@ -5,7 +5,7 @@ Vendor: <%= vendor %>
Architecture: <%= architecture %>
Maintainer: <%= maintainer %>
Installed-Size: <%= attributes[:deb_installed_size] %>
-<% if !dependencies.empty? -%>
+<% if !dependencies.empty? and !attributes[:no_depends?] -%>
Depends: <%= dependencies.collect { |d| fix_dependency(d) }.flatten.join(", ") %>
<% end -%>
<% if !conflicts.empty? -%>
View
@@ -43,9 +43,11 @@ Vendor: <%= vendor %>
URL: <%= url or "http://nourlgiven.example.com/" %>
Packager: <%= maintainer %>
+<% if !attributes[:no_depends?] -%>
<% dependencies.each do |req| -%>
Requires: <%= req %>
<% end -%>
+<% end -%>
<% provides.each do |prov| -%>
Provides: <%= prov %>
<% end -%>

0 comments on commit 02e0868

Please sign in to comment.