Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #315 from mashion/target-os-fix

Respect rpmbuild's argument ordering for #309
  • Loading branch information...
commit bff32ede36a3fc99e56ad077cfba5c9b03c0c9cd 2 parents 4a92657 + 0f44767
@jordansissel authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/fpm/package/rpm.rb
View
12 lib/fpm/package/rpm.rb
@@ -197,17 +197,19 @@ def output(output_path)
output_check(output_path)
raise FileAlreadyExists.new(output_path) if File.exists?(output_path)
%w(BUILD RPMS SRPMS SOURCES SPECS).each { |d| FileUtils.mkdir_p(build_path(d)) }
- args = ["rpmbuild", "-bb",
+ args = ["rpmbuild", "-bb"]
+
+ # issue #309
+ rpm_target = "#{architecture}-unknown-#{attributes[:rpm_os]}"
+ args += ["--target", rpm_target]
+
+ args += [
"--define", "buildroot #{build_path}/BUILD",
"--define", "_topdir #{build_path}",
"--define", "_sourcedir #{build_path}",
"--define", "_rpmdir #{build_path}/RPMS",
]
- # issue #309
- rpm_target = "#{architecture}-unknown-#{attributes[:rpm_os]}"
- args += ["--target", rpm_target]
-
args += ["--sign"] if attributes[:rpm_sign?]
(attributes[:rpm_rpmbuild_define] or []).each do |define|

0 comments on commit bff32ed

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