Permalink
Browse files

using unzip command to extract binary for MacOS.

  • Loading branch information...
tdtds committed Jul 1, 2012
1 parent 856f5c8 commit a22e35203c107278dedb43c995fce5ced6b03656
Showing with 13 additions and 6 deletions.
  1. +12 −5 ext/kindlegen/extconf.rb
  2. +1 −1 lib/kindlegen/version.rb
View
@@ -5,14 +5,21 @@
require 'rbconfig'
File::open('Makefile', 'w') do |w|
tarball = case RbConfig::CONFIG['host_os']
when /mac|darwin/i then "KindleGen_Mac_i386_v2_4.zip"
when /linux|cygwin/i then "kindlegen_linux_2.6_i386_v2_4.tar.gz"
when /mac|darwin/i
unzip = 'unzip'
"KindleGen_Mac_i386_v2_4.zip"
when /linux|cygwin/i
unzip = 'tar zxf'
"kindlegen_linux_2.6_i386_v2_4.tar.gz"
else
STDERR.puts "Host OS unsupported!"
exit(1)
end
config = {"tarball" => tarball}
config = {
"unzip" => unzip,
"tarball" => tarball
}
if Dir::pwd.include? 'gems'
w.puts RbConfig.expand(DATA.read, config.merge('bindir' => '../../../../bin') )
@@ -28,13 +35,13 @@
BINDIR = $(bindir)
TARBALL = $(tarball)
CURL = curl
TARX = tar zxf
UNZIP = $(unzip)
CP = cp
all:
$(TARGET): $(TARBALL)
$(TARX) $(TARBALL)
$(UNZIP) $(TARBALL)
touch $(TARGET)
$(TARBALL):
View
@@ -1,3 +1,3 @@
module Kindlegen
VERSION = "2.4.0"
VERSION = "2.4.1"
end

0 comments on commit a22e352

Please sign in to comment.