mailNative relax installation: Mac OS X 10.8 & Homebrew


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Martin Ballaschk on December 14, 2012 - 12:16:
Hi relax-users,

for everyone who is using relax in scripting mode and doesn't like fink or 
MacPorts, this could be interesting: It's really easy to install relax via 
the "Homebrew" package manger. (see http://mxcl.github.com/homebrew/)


So here is how you do it:

* download and install Apple's Xcode

* install the "Command Line Tools" from inside Xcode

* install Homebrew by typing into your Terminal:
        
        ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

* install python 2.7 with pip, etc on board, scons for relaxation 
  fitting and wxPython for a native Mac GUI:

        brew install python scons wxmac

* install numpy via pip (don't install scipy, as it causes problems with 
scons!)
        
        pip install numpy

* download the relax source release 
  (e.g. http://download.gna.org/relax/relax-2.1.2.src.tar.bz2)

* unpack it into a seperate directory inside /usr/local/

* cd into the directory, type "scons" to make the relaxation fitting modules
* link the relax main program into /usr/local/bin 

That's it.


What should also be easy is to make an "official" package, called "recipe". 
After entering "brew create [relax-tarball]" a recipe is created where 
dependencies and installing instructions are noted. See my non-functional 
attempt at the end of this mail to see what I mean.

Any help on making a recipe would be very much appreciated, since I don't 
know any ruby. 


Have fun,
martin




# =================================================
# relax recipe

require 'formula'

# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!

class Relax < Formula
  homepage 'http://www.nmr-relax.com/'
  url 'http://download.gna.org/relax/relax-2.1.2.src.tar.bz2'
  version '2.1.2'
  sha1 '3c367ec44db3f56c935cdab356962efc9ccb8150'
  
  depends_on 'python' 
  depends_on 'scons'
  depends_on 'numpy' => :python
  
  def install
    # unpack into the Cellar
    prefix.install Dir['*']

    #link "relax" from Cellar into bin (?)
    
    # runs scons in "prefix" to compile rx fitting scripts (?)
    
  end
  
  def test
    # test if installed properly (does that actually work?)
    HOMEBREW_REPOSITORY.cd do
          `#{bin}/relax ls-files -- bin`.chomp == 'bin/brew'
    end
  end
end





Related Messages


Powered by MHonArc, Updated Sun Dec 23 12:00:10 2012