Merge pull request #112 from pjjw/osx-fixes

Fix tar command on OSX, skip .deb md5sums creation
This commit is contained in:
Jordan Sissel 2011-10-27 00:26:53 -07:00
commit 2ccb41570d
2 changed files with 13 additions and 3 deletions

View File

@ -142,10 +142,12 @@ class FPM::Source
end # def tar
def tar_cmd
# Rely on gnu tar for solaris.
# Rely on gnu tar for solaris and OSX.
case %x{uname -s}.chomp
when "SunOS"
return "gtar"
when "Darwin"
return "gnutar"
else
return "tar"
end

View File

@ -26,7 +26,12 @@ class FPM::Target::Deb < FPM::Package
end
def needs_md5sums
true
case %x{uname -s}.chomp
when "Darwin"
return false
else
return true
end
end # def needs_md5sums
def architecture
@ -72,7 +77,10 @@ class FPM::Target::Deb < FPM::Package
end
def build!(params)
control_files = [ "control", "md5sums" ]
control_files = [ "control" ]
if File.exists? "./md5sums"
control_files << "md5sums"
end
# Use custom Debian control file when given ...
if self.settings[:control]