READMEs and DOCs and ant tasks, oh my


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665048 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/README b/lib/cpp/README
new file mode 100644
index 0000000..09a5c34
--- /dev/null
+++ b/lib/cpp/README
@@ -0,0 +1,53 @@
+Thrift C++ Software Library
+
+README Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-05
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Using Thrift with C++
+=====================
+
+The Thrift C++ libraries are built using the GNU tools. Follow the instructions
+in the top-level README, or run bootstrap.sh in this folder to generate the
+Makefiles.
+
+In case you do not want to open another README file, do this:
+  ./bootstrap.sh
+  ./configure (--with-boost=/usr/local)
+  make
+  sudo make install
+
+Thrift is divided into two libraries.
+
+libthrift
+  The core Thrift library contains all the core Thrift code. It requires
+  boost shared pointers, pthreads, and librt.
+
+libthriftnb
+  This library contains the Thrift nonblocking server, which uses libevent.
+  To link this library you will also need to link libevent.
+
+Linking Against Thrift
+======================
+
+After you build and install Thrift the libraries are installed to
+/usr/local/lib by default. Make sure this is in your LDPATH.
+
+On Linux, the best way to do this is to ensure that /usr/local/lib is in
+your /etc/ld.so.conf and then run /sbin/ldconfig.
+
+Depending upon whether you are linking dynamically or statically and how
+your build environment it set up, you may need to include additional
+libraries when linking against thrift, such as librt and/or libpthread. If
+you are using libthriftnb you will also need libevent.
+
+Dependencies
+============
+
+boost shared pointers
+http://www.boost.org/libs/smart_ptr/smart_ptr.htm
+
+libevent (for libthriftnb only)
+http://monkey.org/~provos/libevent/
diff --git a/lib/java/COPYING b/lib/java/COPYING
new file mode 100644
index 0000000..039f21e
--- /dev/null
+++ b/lib/java/COPYING
@@ -0,0 +1,24 @@
+Thrift Software License
+Copyright (c) 2006- Facebook, Inc. 
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/lib/java/LICENSE b/lib/java/LICENSE
new file mode 100644
index 0000000..039f21e
--- /dev/null
+++ b/lib/java/LICENSE
@@ -0,0 +1,24 @@
+Thrift Software License
+Copyright (c) 2006- Facebook, Inc. 
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/lib/java/README b/lib/java/README
new file mode 100644
index 0000000..2557af4
--- /dev/null
+++ b/lib/java/README
@@ -0,0 +1,29 @@
+Thrift Java Software Library
+
+Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-05
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Using Thrift with Java
+======================
+
+The Thrift Java source is not build using the GNU tools, but rather uses
+the Apache Ant build system, which tends to be predominant amongst Java
+developers.
+
+To compile the Java Thrift libraries, simply do the following:
+
+ant
+
+Yep, that's easy. Look for libthrift.jar in the base directory.
+
+To include Thrift in your applications simply add libthrift.jar to your
+classpath, or install if in your default system classpath of choice.
+
+Dependencies
+============
+
+Apache Ant
+http://ant.apache.org/
diff --git a/lib/java/build.xml b/lib/java/build.xml
index d2a4df6..cd01017 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -19,8 +19,8 @@
   </target>
 
   <target name="install" depends="dist">
-    <exec executable="sudo">
-      <arg line="install libthrift.jar /usr/local/lib/" />
+    <exec executable="install">
+      <arg line="libthrift.jar /usr/local/lib/" />
     </exec>
   </target>
 
diff --git a/lib/php/README b/lib/php/README
index 84d60e1..994e6c9 100644
--- a/lib/php/README
+++ b/lib/php/README
@@ -1,6 +1,7 @@
 Thrift PHP Software Library
 
-Mark Slee (mcslee@facebook.com)
+Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-05
 
 Thrift is distributed under the Thrift open source software license.
 Please see the included LICENSE file.
@@ -23,6 +24,16 @@
 done using dirname(__FILE__), which is less efficient than providing the static
 string yourself.
 
+When you generate a Thrift package using the compiler, it makes an assumption
+about where your generated code will live. If your file is "MyPackage.thrift",
+the generated files must be installed into:
+
+$GLOBALS['THRIFT_ROOT'].'/packages/MyPackage/';
+
+This allows the code generator to compile your code without any extra flags
+for the target directory names while still allowing your include paths to
+be absolute (if you have an absolute THRIFT_ROOT).
+
 Dependencies
 ============
 
diff --git a/lib/py/README b/lib/py/README
new file mode 100644
index 0000000..bdd2ef1
--- /dev/null
+++ b/lib/py/README
@@ -0,0 +1,20 @@
+Thrift Python Software Library
+
+Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-05
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Using Thrift with Python
+========================
+
+Thrift is provided as a set of Python packages. The top level package is
+thrift, and there are subpackages for the protocol, transport, and server
+code. Each package contains modules using standard Thrift naming conventions
+(i.e. TProtocol, TTransport) and implementations in corresponding modules
+(i.e. TSocket).
+
+The Python libraries can be installed manually using the provided setup.py
+file, or automatically using the install hook provided via autoconf/automake.
+To use the latter, become superuser and do make install.
diff --git a/lib/py/cleanup.sh b/lib/py/cleanup.sh
index d026a46..bbbcef5 100755
--- a/lib/py/cleanup.sh
+++ b/lib/py/cleanup.sh
@@ -8,7 +8,6 @@
 Makefile.in \
 Makefile.orig \
 NEWS \
-README \
 aclocal.m4 \
 autom4te.cache \
 autoscan.log \
diff --git a/lib/rb/README b/lib/rb/README
new file mode 100644
index 0000000..7e1a1c6
--- /dev/null
+++ b/lib/rb/README
@@ -0,0 +1,29 @@
+Thrift Ruby Software Library
+
+Author: Mark Slee (mcslee@facebook.com)
+Last Modified: 2007-Mar-05
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Using Thrift with Ruby
+======================
+
+Okay, I'll be honest. I learned Ruby by implementing the Thrift library in
+Ruby and writing the code generator at the same time. I am not a trendy
+web 2.0 programmer. Shit, I don't even know Rails. So if you care about Ruby
+you will probably find that this is currently the least robust Thrift library
+implementation. But there's plenty of time to improve it...
+
+The source code for the Ruby library is designed for installation with the
+Python-esque setup.rb utility, which is included here and redistributable
+under the GPL license.
+
+To install the Thrift Ruby libraries, become superuser and do:
+
+ruby setup.rb config
+ruby setup.rb setup
+ruby setup.rb install
+
+Alternatively, if you know more about Ruby than me, you can improve the build
+and installation process and contribute them back to this project. Wicked.