portfile and install scripts
Jeremy Lavergne
jeremy at lavergne.gotdns.org
Fri Sep 11 18:29:16 PDT 2009
> I am switching all of my packaging efforts over from fink to
> MacPorts and had a question which I haven't quite found the answer
> to in the MacPorts documentation. My initial attempt was going to be
> a port of the molmol molecular modelling program. The fink packaging
> script uses an InstallScript of the form...
>
> InstallScript: <<
> #!/bin/zsh -efv
> /bin/rm -f **/*.o **/*.c
> mkdir -p %i/share/molmol
> cp -R * %i/share/molmol/.
> mkdir -p %i/bin
> ln -s %p/share/molmol/molmol %i/bin/molmol
> mkdir -p %i/share/doc/molmol
> ln -s %p/share/molmol/COPYING %i/share/doc/molmol/COPYING
> ln -s %p/share/molmol/man %i/share/doc/molmol/man
> <<
>
> What is best practices in MacPorts for trying to achieve this. Would
> that be achieved with a single phase override
> like...
>
> destroot {
> /bin/rm -f **/*.o **/*.c
> mkdir -p ${destroot}${prefix}/share/molmol
> cp -R * ${destroot}${prefix}/share/molmol/.
> mkdir -p ${destroot}${prefix}/bin
> ln -s ${prefix}/share/molmol/molmol ${destroot}${prefix}/bin/molmol
> mkdir -p ${destroot}${prefix}/share/doc/molmol
> ln -s ${prefix}/share/molmol/COPYING ${destroot}${prefix}/share/doc/
> molmol/COPYING
> ln -s ${prefix}/share/molmol/man ${destroot}${prefix}/share/doc/
> molmol/man
> }
>
> or am I misreading the manual? Thanks in advance for any advice here.
You probably don't want to override the whole phase; I'd suggest using
post-destroot instead. This will make sense since the destroot phase
will put the package into a "sandbox" where you can then take out what
you want prior to it actually being installed.
More information about the macports-dev
mailing list