Skip to content
Browse files

factor out the architecture munging into a method in FPM::Deb

  • Loading branch information...
1 parent 79020d0 commit fd9f4579dadf5ab56fee3bc99afe43e0ef8445f9 @jneen jneen committed
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/fpm/deb.rb
View
13 lib/fpm/deb.rb
@@ -6,6 +6,14 @@
require "fpm/package"
class FPM::Deb < FPM::Package
+ # Debian calls x86_64 "amd64"
+ def architecture
+ if @architecture == "x86_64"
+ "amd64"
+ else
+ @architecture
+ end
+ end
# Assemble the package.
# params:
@@ -23,11 +31,8 @@ def assemble(params)
output = params["output"]
type = "deb"
- # Debian calls x86_64 "amd64"
- @architecture = "amd64" if @architecture == "x86_64"
-
output.gsub!(/VERSION/, "#{@version}-#{@iteration}")
- output.gsub!(/ARCH/, @architecture)
+ output.gsub!(/ARCH/, architecture)
builddir = "#{Dir.pwd}/build-#{type}-#{File.basename(output)}"
@garbage << builddir

0 comments on commit fd9f457

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