portfile and install scripts

Jack Howarth howarth at bromo.med.uc.edu
Fri Sep 11 18:19:22 PDT 2009


Hi,
   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.
            Jack


More information about the macports-dev mailing list