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

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 6 14:13:01 CEST 2008


On Fri, 6 Jun 2008, Dirk Eddelbuettel wrote:

>
> Brian,
>
> Thanks for the follow-up.
>
> On 6 June 2008 at 11:34, Prof Brian Ripley wrote:
> | Isn't this what Type: Frontend is for?  That gives you complete control
> | and would seem appropriate for both of your examples.
>
> Interesting.  But the R Extensions manual says
>
>   1.10.1 Frontend
>   ---------------
>
>   This is a rather general mechanism, designed for adding new front-ends
>   such as the *gnomeGUI* package.  If a `configure' file is found in the
>   top-level directory of the package it is executed, and then if a
>   `Makefile' is found (often generated by `configure'), `make' is called.
>   If `R CMD INSTALL --clean' is used `make clean' is called.  No other
>   action is taken.
>
> I am talking about the need for 'other action' such as 'make install', say.
>
> Are you suggesting I shoehorn what I want done into the main 'make' target ?

Yes.  I don't see it as 'shoehorn' -- it is the install step.

>
> | On Thu, 5 Jun 2008, Dirk Eddelbuettel wrote:
> |
> | >
> | > 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
> |
> | I hope not in 'bin' -- I am not sure if you mean $PREFIX/lib[64] or
> | $R_HOME/lib?
>
> Yes, cut&paste error. $PREFIX/lib is of course what I had in mind.
>
> Other cases that may profit from this are
>
>           iii)  Some other 'content' such as CRANberries or the cran2deb
>              efforts could use it to synchronise / update SQLite database
>              files in agreed upon locations.
>
> 	   iv)  Web-based R add-ons could possibly use this mechanism to hook
> 	      into the web server.
>
> Dirk
>
> | > 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.
> | >
> | > ______________________________________________
> | > R-devel at r-project.org mailing list
> | > https://stat.ethz.ch/mailman/listinfo/r-devel
> | >
> |
> | --
> | Brian D. Ripley,                  ripley at stats.ox.ac.uk
> | Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> | University of Oxford,             Tel:  +44 1865 272861 (self)
> | 1 South Parks Road,                     +44 1865 272866 (PA)
> | Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
> -- 
> Three out of two people have difficulties with fractions.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list