2009-12-18 20:07:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pig < Formula
|
2011-04-25 15:07:43 +00:00
|
|
|
url 'ftp://apache.mirrors.pair.com//pig/pig-0.8.1/pig-0.8.1.tar.gz'
|
2009-12-18 20:07:13 +00:00
|
|
|
homepage 'http://hadoop.apache.org/pig/'
|
2011-04-25 15:07:43 +00:00
|
|
|
md5 'd3325f5816b68fb3c1d405095fcf5c7a'
|
2009-12-18 20:07:13 +00:00
|
|
|
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2010-03-07 06:27:19 +00:00
|
|
|
rm_f Dir["bin/*.bat"]
|
2011-04-25 15:07:43 +00:00
|
|
|
prefix.install ['bin', "pig-#{version}-core.jar"]
|
2009-12-18 20:07:13 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# There's something weird with Pig's launch script, it doesn't find the correct
|
|
|
|
# path. This patch removes a test that should fail, but doesn't.
|
|
|
|
__END__
|
|
|
|
diff --git a/bin/pig b/bin/pig
|
|
|
|
index 97fc649..79056cf 100644
|
|
|
|
--- a/bin/pig
|
|
|
|
+++ b/bin/pig
|
|
|
|
@@ -56,11 +56,7 @@ this="$0"
|
|
|
|
while [ -h "$this" ]; do
|
|
|
|
ls=`ls -ld "$this"`
|
|
|
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
|
|
- if expr "$link" : '.*/.*' > /dev/null; then
|
|
|
|
- this="$link"
|
|
|
|
- else
|
|
|
|
- this=`dirname "$this"`/"$link"
|
|
|
|
- fi
|
|
|
|
+ this=`dirname "$this"`/"$link"
|
|
|
|
done
|
2011-04-25 15:07:43 +00:00
|
|
|
|
2009-12-18 20:07:13 +00:00
|
|
|
# convert relative path to absolute path
|