Skip to content

Commit

Permalink
Updates to build script and README - REMOVED automatic libgit2 instal…
Browse files Browse the repository at this point in the history
…lation'
  • Loading branch information
tbranyen committed Feb 25, 2011
1 parent 3b7df5c commit 22137ee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
24 changes: 12 additions & 12 deletions README.md
Expand Up @@ -11,23 +11,18 @@ Building and installing
### Dependancies ###
To use `nodegit2`, you will need to have the `libgit2` shared library in `/usr/local/lib` and the `NodeJS`
framework installed, you will also need `git` installed and accessible from your `PATH` to fetch any `vendor/` addons.
__ You can skip this step and `nodegit2` will automatically fetch and install a fresh copy of `libgit2` for you. __

__ Windows Users: __ Compile through Cygwin, following the Unix instructions below.
__ OS X Users: __ Install using `brew` or `macports`.
__ Linux/Unix Users: __ Install from source or your favorite package manager.

### Using NPM ###

The __ easiest __ way to get `nodegit2` \* Note: If you do not have write privileges to `/usr/local/lib` this will need to be run as superuser \*
The __ easiest __ way to get `nodegit2`

[tim@thinkpad Projects]$ npm install nodegit2

### Linux/Mac OS X/BSD Variants ###
\*If you have `nodegit2` install `libgit2` for you, you must run `make` with a user that has priviledges to write to `/usr/local/lib`\*

#### Install `libgit2` from [http://libgit2.github.com/](http://libgit2.github.com/) ####

[tim@thinkpad Projects]$ cd libgit2
[tim@thinkpad libgit2]$ ./configure
[tim@thinkpad libgit2]$ make
[tim@thinkpad libgit2]$ sudo make install
### Mac OS X/Linux/Unix ###

#### Install `NodeJS` from [http://nodejs.org/](http://nodejs.org/) ####

Expand All @@ -36,12 +31,17 @@ The __ easiest __ way to get `nodegit2` \* Note: If you do not have write privil
[tim@thinkpad node-v0.4.0]$ make
[tim@thinkpad node-v0.4.0]$ sudo make install

#### Install `libgit2` from [http://libgit2.github.com/](http://libgit2.github.com/) ####

[tim@thinkpad Projects]$ cd libgit2
[tim@thinkpad libgit2]$ sudo python waf configure build-shared install

#### Install `nodegit2` by cloning source from __GitHub__ and running the `make` and `make install` commands. ####
\* Remember you only need to run make as superuser if you want `nodegit2` to install `libgit2` for you. \*

[tim@thinkpad Projects]$ git clone git@github.com:tbranyen/nodegit2.git
[tim@thinkpad Projects]$ cd nodegit2
[tim@thinkpad nodegit2]$ sudo make
[tim@thinkpad nodegit2]$ make
[tim@thinkpad nodegit2]$ make install

### Windows via Cygiwn ###
Expand Down
11 changes: 7 additions & 4 deletions wscript
Expand Up @@ -14,10 +14,13 @@ def configure(conf):

if not conf.check(lib='git2'):
if not conf.check(lib='git2', libpath=['/usr/local/lib'], uselib_store='GIT2'):
Popen('git submodule init vendor/libgit2', shell=True).wait()
Popen('git submodule update vendor/libgit2', shell=True).wait()
os.chdir('vendor/libgit2')
Popen('python waf configure build-shared install', shell=True).wait()
print 'libgit2 is required in the folder /usr/local/lib'
print ''
print 'Run the following commands to install:'
print 'git submodule init vendor/libgit2'
print 'git submodule update vendor/libgit2'
print 'vendor/libgit2'
print 'python waf configure build-shared install'

def build(bld):
obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
Expand Down

0 comments on commit 22137ee

Please sign in to comment.