From edd at debian.org  Thu Jun  5 16:06:01 2008
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 5 Jun 2008 09:06:01 -0500
Subject: [Rd] RFC: Add 'postinstall' hook to R CMD INSTALL ?
Message-ID: <18503.62153.774662.127482@ron.nulle.part>


I have been mulling over an idea I had meant to flesh out with a prototype
but haven't gotten around to.   So here it goes in the abstract without
working code:


What:  Extend 'R CMD INSTALL' to also work on sources that are not strictly
       CRAN packages

Why:  'R CMD INSTALL' is very good and very successful for CRAN packages. It
      has solved most issues related to configure, make, ... etc by relying
      on pre-computed and stored values.

      CRAN is also very good as a mirror network to distribute content that
      is easy to obtain by useRs.
       
      So there are cases where I'd like to use CRAN / R CMD INSTALL to work
      on non-package code. Two case are

        i)  littler which is easy to 'configure; make; make install' but 
            would want to live in $PREFIX/bin -- and I need to copy it there

        ii) RCpp which is a library / glue code making live easier for C++
  	    code to interface with R; also easy to configure but I'd then
  	    libRcpp.{so,a} to be in $PREFIX/bin -- and I need to copy it
	    there

How:  Similar to 'cleanup' we could have a script 'postinstall' in the
      top-level directory, and if present, R would execute it.


As I'm the one with the itch, I'd be happy to work on code towards
implementing this -- but before I go overboard with it, I'd love to hear
comments, suggestions, questions, ...  It is worthwhile? Is it feasible?
What did I overlook?

Thanks, Dirk

-- 
Three out of two people have difficulties with fractions.



[Rd] RFC: Add 'postinstall' hook to R CMD INSTALL ?
Dirk Eddelbuettel