Reformat LICENSE and REAMDE

Wrap at 80 characters.
This commit is contained in:
Erik Michaels-Ober 2013-09-01 13:26:03 +01:00
parent cc23bd24f9
commit 419f16e35c
2 changed files with 127 additions and 143 deletions

33
LICENSE
View file

@ -1,20 +1,19 @@
Copyright (c) 2012 Sam Stephenson Copyright (c) 2012-2013 Sam Stephenson
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining a copy of
a copy of this software and associated documentation files (the this software and associated documentation files (the "Software"), to deal in
"Software"), to deal in the Software without restriction, including the Software without restriction, including without limitation the rights to
without limitation the rights to use, copy, modify, merge, publish, use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
distribute, sublicense, and/or sell copies of the Software, and to of the Software, and to permit persons to whom the Software is furnished to do
permit persons to whom the Software is furnished to do so, subject to so, subject to the following conditions:
the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be included in all
included in all copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE.

237
README.md
View file

@ -1,55 +1,53 @@
# ruby-build # ruby-build
ruby-build is an [rbenv](https://github.com/sstephenson/rbenv) plugin ruby-build is an [rbenv](https://github.com/sstephenson/rbenv) plugin that
that provides an `rbenv install` command to compile and install provides an `rbenv install` command to compile and install different versions
different versions of Ruby on UNIX-like systems. of Ruby on UNIX-like systems.
You can also use ruby-build without rbenv in environments where you You can also use ruby-build without rbenv in environments where you need
need precise control over Ruby version installation. precise control over Ruby version installation.
## Installation ## Installation
### Installing as an rbenv plugin (recommended) ### Installing as an rbenv plugin (recommended)
Installing ruby-build as an rbenv plugin will give you access to the Installing ruby-build as an rbenv plugin will give you access to the `rbenv
`rbenv install` command. install` command.
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
This will install the latest development version of ruby-build into This will install the latest development version of ruby-build into the
the `~/.rbenv/plugins/ruby-build` directory. From that directory, you `~/.rbenv/plugins/ruby-build` directory. From that directory, you can check out
can check out a specific release tag. To update ruby-build, run `git a specific release tag. To update ruby-build, run `git pull` to download the
pull` to download the latest changes. latest changes.
### Installing as a standalone program (advanced) ### Installing as a standalone program (advanced)
Installing ruby-build as a standalone program will give you access to Installing ruby-build as a standalone program will give you access to the
the `ruby-build` command for precise control over Ruby version `ruby-build` command for precise control over Ruby version installation. If you
installation. If you have rbenv installed, you will also be able to have rbenv installed, you will also be able to use the `rbenv install` command.
use the `rbenv install` command.
git clone https://github.com/sstephenson/ruby-build.git git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build cd ruby-build
./install.sh ./install.sh
This will install ruby-build into `/usr/local`. If you do not have This will install ruby-build into `/usr/local`. If you do not have write
write permission to `/usr/local`, you will need to run `sudo permission to `/usr/local`, you will need to run `sudo ./install.sh` instead.
./install.sh` instead. You can install to a different prefix by You can install to a different prefix by setting the `PREFIX` environment
setting the `PREFIX` environment variable. variable.
To update ruby-build after it has been installed, run `git pull` in To update ruby-build after it has been installed, run `git pull` in your cloned
your cloned copy of the repository, then re-run the install script. copy of the repository, then re-run the install script.
### Installing with Homebrew (for OS X users) ### Installing with Homebrew (for OS X users)
Mac OS X users can install ruby-build with the Mac OS X users can install ruby-build with the [Homebrew](http://brew.sh)
[Homebrew](http://brew.sh) package manager. This package manager. This will give you access to the `ruby-build` command. If you
will give you access to the `ruby-build` command. If you have rbenv have rbenv installed, you will also be able to use the `rbenv install` command.
installed, you will also be able to use the `rbenv install` command.
*This is the recommended method of installation if you installed rbenv *This is the recommended method of installation if you installed rbenv with
with Homebrew.* Homebrew.*
brew install ruby-build brew install ruby-build
@ -62,161 +60,148 @@ Or, if you would like to install the latest development release:
### Using `rbenv install` with rbenv ### Using `rbenv install` with rbenv
To install a Ruby version for use with rbenv, run `rbenv install` with To install a Ruby version for use with rbenv, run `rbenv install` with the
the exact name of the version you want to install. For example, exact name of the version you want to install. For example,
rbenv install 1.9.3-p448 rbenv install 1.9.3-p448
Ruby versions will be installed into a directory of the same name Ruby versions will be installed into a directory of the same name under
under `~/.rbenv/versions`. `~/.rbenv/versions`.
To see a list of all available Ruby versions, run `rbenv install --list`. To see a list of all available Ruby versions, run `rbenv install --list`. You
You may also tab-complete available Ruby may also tab-complete available Ruby versions if your rbenv installation is
versions if your rbenv installation is properly configured. properly configured.
### Using `ruby-build` standalone ### Using `ruby-build` standalone
If you have installed ruby-build as a standalone program, you can use If you have installed ruby-build as a standalone program, you can use the
the `ruby-build` command to compile and install Ruby versions into `ruby-build` command to compile and install Ruby versions into specific
specific locations. locations.
Run the `ruby-build` command with the exact name of the version you Run the `ruby-build` command with the exact name of the version you want to
want to install and the full path where you want to install it. For install and the full path where you want to install it. For example,
example,
ruby-build 1.9.3-p448 ~/local/ruby-1.9.3-p448 ruby-build 1.9.3-p448 ~/local/ruby-1.9.3-p448
To see a list of all available Ruby versions, run `ruby-build To see a list of all available Ruby versions, run `ruby-build --definitions`.
--definitions`.
Pass the `-v` or `--verbose` flag to `ruby-build` as the first Pass the `-v` or `--verbose` flag to `ruby-build` as the first argument to see
argument to see what's happening under the hood. what's happening under the hood.
### Custom definitions ### Custom definitions
Both `rbenv install` and `ruby-build` accept a path to a custom Both `rbenv install` and `ruby-build` accept a path to a custom definition file
definition file in place of a version name. Custom definitions let you in place of a version name. Custom definitions let you develop and install
develop and install versions of Ruby that are not yet supported by versions of Ruby that are not yet supported by ruby-build.
ruby-build.
See the [ruby-build built-in See the [ruby-build built-in definitions][definitions] as a starting point for
definitions](https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build) custom definition files.
as a starting point for custom definition files.
[definitions]: https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build
### Special environment variables ### Special environment variables
You can set certain environment variables to control the build You can set certain environment variables to control the build process.
process.
* `TMPDIR` sets the location where ruby-build stores temporary files. * `TMPDIR` sets the location where ruby-build stores temporary files.
* `RUBY_BUILD_BUILD_PATH` sets the location in which sources are * `RUBY_BUILD_BUILD_PATH` sets the location in which sources are downloaded and
downloaded and built. By default, this is a subdirectory of built. By default, this is a subdirectory of `TMPDIR`.
`TMPDIR`. * `RUBY_BUILD_CACHE_PATH`, if set, specifies a directory to use for caching
* `RUBY_BUILD_CACHE_PATH`, if set, specifies a directory to use for downloaded package files.
caching downloaded package files. * `RUBY_BUILD_MIRROR_URL` overrides the default mirror URL root to one of your
* `RUBY_BUILD_MIRROR_URL` overrides the default mirror URL root to one choosing.
of your choosing. * `RUBY_BUILD_SKIP_MIRROR`, if set, forces ruby-build to download packages from
* `RUBY_BUILD_SKIP_MIRROR`, if set, forces ruby-build to download their original source URLs instead of using a mirror.
packages from their original source URLs instead of using a mirror.
* `CC` sets the path to the C compiler. * `CC` sets the path to the C compiler.
* `CONFIGURE_OPTS` lets you pass additional options to `./configure`. * `CONFIGURE_OPTS` lets you pass additional options to `./configure`.
* `MAKE` lets you override the command to use for `make`. Useful for * `MAKE` lets you override the command to use for `make`. Useful for specifying
specifying GNU make (`gmake`) on some systems. GNU make (`gmake`) on some systems.
* `MAKE_OPTS` (or `MAKEOPTS`) lets you pass additional options to * `MAKE_OPTS` (or `MAKEOPTS`) lets you pass additional options to `make`.
`make`. * `RUBY_CONFIGURE_OPTS` and `RUBY_MAKE_OPTS` allow you to specify configure and
* `RUBY_CONFIGURE_OPTS` and `RUBY_MAKE_OPTS` allow you to specify make options for buildling MRI. These variables will be passed to Ruby only,
configure and make options for buildling MRI. These variables will not any dependent packages (e.g. libyaml).
be passed to Ruby only, not any dependent packages (e.g. libyaml).
### Checksum verification ### Checksum verification
If you have the `md5`, `openssl`, or `md5sum` tool installed, If you have the `md5`, `openssl`, or `md5sum` tool installed, ruby-build will
ruby-build will automatically verify the MD5 checksum of each automatically verify the MD5 checksum of each downloaded package before
downloaded package before installing it. installing it.
Checksums are optional and specified as anchors on the package URL in Checksums are optional and specified as anchors on the package URL in each
each definition. (All bundled definitions include checksums.) definition. (All bundled definitions include checksums.)
### Package download mirrors ### Package download mirrors
ruby-build will first attempt to download package files from a mirror ruby-build will first attempt to download package files from a mirror hosted on
hosted on Amazon CloudFront. If a package is not available on the Amazon CloudFront. If a package is not available on the mirror, if the mirror
mirror, if the mirror is down, or if the download is corrupt, is down, or if the download is corrupt, ruby-build will fall back to the
ruby-build will fall back to the official URL specified in the official URL specified in the defintion file.
defintion file.
You can point ruby-build to another mirror by specifying the You can point ruby-build to another mirror by specifying the
`RUBY_BUILD_MIRROR_URL` environment variable--useful if you'd like to `RUBY_BUILD_MIRROR_URL` environment variable--useful if you'd like to run your
run your own local mirror, for example. Package mirror URLs are own local mirror, for example. Package mirror URLs are constructed by joining
constructed by joining this variable with the MD5 checksum of the this variable with the MD5 checksum of the package file.
package file.
If you don't have an MD5 program installed, ruby-build will skip the If you don't have an MD5 program installed, ruby-build will skip the download
download mirror and use official URLs instead. You can force mirror and use official URLs instead. You can force ruby-build to bypass the
ruby-build to bypass the mirror by setting the mirror by setting the `RUBY_BUILD_SKIP_MIRROR` environment variable.
`RUBY_BUILD_SKIP_MIRROR` environment variable.
The official ruby-build download mirror is sponsored by The official ruby-build download mirror is sponsored by
[37signals](http://37signals.com/). [37signals](http://37signals.com/).
### Package download caching ### Package download caching
You can instruct ruby-build to keep a local cache of downloaded You can instruct ruby-build to keep a local cache of downloaded package files
package files by setting the `RUBY_BUILD_CACHE_PATH` environment by setting the `RUBY_BUILD_CACHE_PATH` environment variable. When set, package
variable. When set, package files will be kept in this directory after files will be kept in this directory after the first successful download and
the first successful download and reused by subsequent invocations of reused by subsequent invocations of `ruby-build` and `rbenv install`.
`ruby-build` and `rbenv install`.
The `rbenv install` command defaults this path to `~/.rbenv/cache`, so The `rbenv install` command defaults this path to `~/.rbenv/cache`, so in most
in most cases you can enable download caching simply by creating that cases you can enable download caching simply by creating that directory.
directory.
### Keeping the build directory after installation ### Keeping the build directory after installation
Both `ruby-build` and `rbenv install` accept the `-k` or `--keep` Both `ruby-build` and `rbenv install` accept the `-k` or `--keep` flag, which
flag, which tells ruby-build to keep the downloaded source after tells ruby-build to keep the downloaded source after installation. This can be
installation. This can be useful if you need to use `gdb` and useful if you need to use `gdb` and `memprof` with Ruby.
`memprof` with Ruby.
Source code will be kept in a parallel directory tree Source code will be kept in a parallel directory tree `~/.rbenv/sources` when
`~/.rbenv/sources` when using `--keep` with the `rbenv install` using `--keep` with the `rbenv install` command. You should specify the
command. You should specify the location of the source code with the location of the source code with the `RUBY_BUILD_BUILD_PATH` environment
`RUBY_BUILD_BUILD_PATH` environment variable when using `--keep` with variable when using `--keep` with `ruby-build`.
`ruby-build`.
## Getting Help ## Getting Help
Please see the [ruby-build Please see the [ruby-build wiki][wiki] for solutions to common problems.
wiki](https://github.com/sstephenson/ruby-build/wiki) for solutions to
common problems. [wiki]: https://github.com/sstephenson/ruby-build/wiki
If you can't find an answer on the wiki, open an issue on the [issue If you can't find an answer on the wiki, open an issue on the [issue
tracker](https://github.com/sstephenson/ruby-build/issues). Be sure to tracker](https://github.com/sstephenson/ruby-build/issues). Be sure to include
include the full build log for build failures. the full build log for build failures.
### License ### License
(The MIT License) (The MIT License)
Copyright (c) 2012 Sam Stephenson Copyright (c) 2012-2013 Sam Stephenson
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining a copy of
a copy of this software and associated documentation files (the this software and associated documentation files (the "Software"), to deal in
"Software"), to deal in the Software without restriction, including the Software without restriction, including without limitation the rights to
without limitation the rights to use, copy, modify, merge, publish, use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
distribute, sublicense, and/or sell copies of the Software, and to of the Software, and to permit persons to whom the Software is furnished to do
permit persons to whom the Software is furnished to do so, subject to so, subject to the following conditions:
the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be included in all
included in all copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SOFTWARE.