Adding feature: --no-depends flag for deb and rpm #289

Merged
merged 2 commits into from Nov 15, 2012
Jump to file or symbol
Failed to load files and symbols.
+6 −1
Diff settings

Always

Just for now

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 -%>