Permalink
Browse files

added extcong making kindlegen command.

  • Loading branch information...
tdtds committed Dec 1, 2011
1 parent 3552c8f commit e86f5f51b6db90ebcfb06b7e07c007b97af1b5b0
Showing with 32 additions and 2 deletions.
  1. +0 −2 bin/kindlegen
  2. +31 −0 ext/kindlegen/extconf.rb
  3. +1 −0 kindlegen.gemspec
View
@@ -1,2 +0,0 @@
-#! /bin/sh
-echo 'this is dummy'
View
@@ -0,0 +1,31 @@
+#
+# making Makefile getting kindlegen from Amazon.com
+#
+
+File::open( 'Makefile', 'w' ) do |w|
+ w.puts RbConfig.expand( DATA.read )
+end
+
+__END__
+AMAZON = http://s3.amazonaws.com/kindlegen
+TARGET = kindlegen
+BINDIR = $(bindir)
+PLATFORM = linux_2.6_i386
+VERSION = 1.2
+TARBALL = $(TARGET)_$(PLATFORM)_v$(VERSION).tar.gz
+CURL = curl
+TARX = tar zxf
+CP = cp
+
+all: $(TARGET)
+
+$(TARGET): $(TARBALL)
+ $(TARX) $(TARBALL)
+ touch $(TARGET)
+
+$(TARBALL):
+ $(CURL) $(AMAZON)/$(TARBALL) -o $(TARBALL)
+
+install: $(TARGET)
+ $(CP) $(TARGET) $(BINDIR)
+
View
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
+ s.extensions << 'ext/kindlegen/extconf.rb'
# specify any dependencies here; for example:
# s.add_development_dependency "rspec"

0 comments on commit e86f5f5

Please sign in to comment.