Skip to content
jacob-carlborg edited this page Jul 21, 2011 · 9 revisions

(This my be removed in favor of [orbspecs](orbspec specification))

An orbfile is a file listing all dependencies a project depends on. It's usually located at the top level of a project and it's just named "orbfile". An orbfile can look as follows:

orb "dwt", "0.5.3" # specifies an exact version
orb "sqlite" # uses the latest version
orb "orange", "> 0.0.1" # uses any version greater than "0.0.1", basically any comparison operator is allowed here
orb "derelict", "~> 0.3.4" # uses any version above "0.3.4" that is "0.x.y", i.e. won't use any "1.x.y"     version

See the Versions section at the [Orb Package](orb package) page for a more detailed explanation of versions.

Syntax

Executing a Command

<command> <args>

Where <command> is the name of the command, any of the listed commands below. <args> is comma separated list of arguments for the command.

Comments

# this is a comment

Check Platform

if version.darwin
    # Mac OS X specific configuration
end

Set platform

version.darwin = true

(An orbspec is written in Ruby)

Commands

orb - Specifies a dependency on an orb package. It takes one mandatory command and one optional argument. The first, mandatory, argument is the name of the orb package. The second, optional, argument can be either a string, in that case it specifies the version of the package. Or it can be a hash of options. The hash indicates from which repository and type of repository or local directory where the package can be found:

orb "dvm", :hg => "https://bitbucket.org/doob/dvm" # mercurial repository
orb "orbit", :git => "git://github.com/jacob-carlborg/orbit.git" # git repository
orb "tango", :svn => "svn.dsource.org/projects/tango/trunk" # subversion repository
orb "foobar", :path => "~/foobar" # local path

For the above to work it's required that the repository or local path contains a <name>.orbspec file at the top level.

Example:

orb "dwt"
orb "orange", "> 0.0.1"
orb "dvm", :hg => "https://bitbucket.org/doob/dvm"

source - Specifies the central repository to fetch orb packages from. Takes one mandatory argument which should be an URL or a local path to the central repository. If no protocol is specified in the string, HTTP is assumed. Specify "file://" for local path. Example:

source "dorbit.org"
source "file:///usr/local/orbit/server"

orbspec - Use an orbspec file to manage dependencies. When this command is used the orbfile will include all dependencies from an orbspec file. Takes one optional argument indicating what orbspec file to include dependencies from. If no argument is given then it will use the orbspec file in the same directory as the orbfile. This will not work if there are more than one orbspec file in that directory.

orbspec
orbspec "dwt"
orbspec "../util"

Versions

The following list contains the predefined versions and on which platforms they are defined:

  • darwin - Alias for osx
  • freebsd - FreeBSD
  • linux - Linux
  • osx - Mac OS X
  • posix - Mac OS X, Linux and FreeBSD
  • windows - Windows
  • bit64 - All 64bit platforms
  • bit32 - All 32bit platforms
Clone this wiki locally