public
Description: Hookin-based RubyPorts system
Homepage:
Clone URL: git://github.com/chneukirchen/rubyports.git
chneukirchen (author)
Tue May 13 02:05:34 -0700 2008
commit  136c5687731eb602c97664cfa5a41cd6eefa545d
tree    60caa34c3f1d51bf6acaa8f55173b3e2fa0a82d3
parent  3df46a4d2a69b2a86f820f10ceccd847a4f7bccd parent  70d273d6b92450ea57d828ab02e5091020916bf0
name age message
file .gitignore Loading commit data...
file README
file hook-bin.rb
file hook-get.rb
directory ports/
README
= RubyPorts -- a hookin-based ports system for Ruby

Copyright (C) 2008 Christian Neukirchen <purl.org/net/chneukirchen>

RubyPorts is freely distributable under the terms of an MIT-style license.
See COPYING or http://www.opensource.org/licenses/mit-license.php.

== How to install

Run <tt>hook-bin.rb</tt> and add the <tt>bin</tt> directory to your path.

You need curl(1) to fetch packages over HTTP.
You need tar(1) to unpack packages.
You need svn, darcs, and git to check out package repositories.

You need a development tool chain installed if you want to build
extensions.  RubyPorts does not provide binaries.

== How to use

Usually, you will want to use RubyPorts directly from the Git checkout.
Periodically call <tt>git pull</tt> to keep your ports tree fresh.

Use <tt>ls -1 ports/*/*.rport</tt> to get a list of available ports.

To install a port, simply type <tt>hook-get.rb /path/to/portsfile.rport</tt>
to automatically download, build and hookin the port.  Dependencies
will be installed automatically if possible.  You can also try to type
<tt>hook-get.rb portname</tt> and hook-get will try to figure out what
you want to install.  Note that this can install unstable and even
broken development versions of your code; you may wish to provide a
version number as well.

Periodically call <tt>hook-bin.rb</tt> to update the symlinks in
<tt>bin</tt>.

Set the environment variable $RUBYPORTS to the full path of the
"ports" directory if you want to call hook-get from any location.

== How RubyPorts works

Every port consists of a .rport-file that contains download and
building instructions.  It looks like this:

    # A package-line declaring the package name and version (no
    # version if it packages the trunk).
    # This defines the pkgpath as "mongrel-1.1.3".
    package 'mongrel', '1.1.3'

    # A list of dependencies, as by the versioning convention.
    depend 'fastthread-1.0.1...'
    depend 'daemons-1.0.3...'

    # A source, which can be:
    # tar_gz URL:: a tar.gz unpacking(!) into pkgpath
    # tar_bz2 URL:: a tar.bz2 unpacking(!) into pkgpath
    # gem URL:: a URL to a .gem file unpacked to pkgpath.
    # git URL, head="HEAD":: a git checkout of the respective head to pkgpath
    # svn URL:: a SVN checkout of the URL to pkgpath
    # darcs URL, tag=nil:: a Darcs checkout of the repo (possibly of a
    #                      tag) to pkgpath
    tar_gz "http://rubyforge.org/frs/download.php/30048/mongrel-1.1.3.tgz"

    # Optional build commands, run in pkgpath
    build "ruby setup.rb config"
    build "ruby setup.rb setup"

    # A optional "hookin add" call, defaulting to "hookin add $pkgpath
    # $pkgpath/lib" if not mentioned.
    hookin pkgpath, [pkgpath+"/lib", pkgpath+"/ext/http11"]

== RubyPorts port naming conventions

* foo.rport will install the current development branch from the repository.
* foo-VERSION.rport will install a release VERSION.

== RubyPorts versioning conventions

* foo means any version of foo.
* foo-1.0 means any version of foo prefixed with "1.0".
* foo-1.0... means any version of foo starting from "1.0".
* foo-1.0.1...foo-2 means any version of foo starting from "1.0.1"
  up to, but not including any version starting with 2.

== Caveat user

Please take note of these things:

* RubyPorts is utterly alpha.  There is zero error handling as of now.
  If it breaks you get to keep both pieces.

* Therefore, consider using a hookin.db on its own for RubyPorts.

== Contact

Please mail bugs, suggestions and patches to
<mailto:chneukirchen@gmail.com>.

Git repository ("git send-email" is welcome for patches):
git clone http://git.vuxu.org/rubyports.git
git clone git://github.com/chneukirchen/rubyports.git

Patches contributing a port are welcome *iff*
* the patch only touch/add the desc and PORT.rport files.
* the patch is titled "Added port PORT-VERSION" or "Update port
  PORT-VERSION".
* all dependencies are already in RubyPorts or contributed as well.

== Thanks to

* Michael Fellinger, for help with development.
* pkgsrc/DarwinPorts/OpenBSD ports/portage for inspiration.
* Paul Feyerabend, for making me open my eyes.

== Copyright

Copyright (C) 2008  Christian Neukirchen <http://purl.org/net/chneukirchen>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

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 AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.