1
0
mirror of https://github.com/jordansissel/fpm synced 2025-09-22 11:50:31 +02:00

Merge pull request #687 from vStone/feature/rpm-custom-requires

rpm: Add a option to insert raw Require statements
This commit is contained in:
Jordan Sissel 2015-11-07 12:01:22 -08:00
commit 93382dcdb3
2 changed files with 11 additions and 0 deletions

@ -122,6 +122,14 @@ class FPM::Package::RPM < FPM::Package
next rpmbuild_filter_from_requires
end
rpm_tags = []
option "--tag", "TAG",
"Adds a custom tag in the spec file as is. " \
"Example: --rpm-tag 'Requires(post): /usr/sbin/alternatives'" do |add_tag|
rpm_tags << add_tag
next rpm_tags
end
option "--ignore-iteration-in-dependencies", :flag,
"For '=' (equal) dependencies, allow iterations on the specified " \
"version. Default is to be specific. This option allows the same " \

@ -83,6 +83,9 @@ Packager: <%= maintainer %>
<% dependencies.each do |req| -%>
Requires: <%= req %>
<% end -%>
<% (attributes[:rpm_tags] or []).each do |tag| -%>
<%= tag %>
<% end -%>
<% end -%>
<% provides.each do |prov| -%>
Provides: <%= prov %>