Portfile clarifications
Jim Busser
jbusser at interchange.ubc.ca
Wed Sep 9 15:53:35 PDT 2009
On 7-Sep-09, at 1:24 AM, Bryan Blackburn wrote:
a lot that was helpful... thanks, but still referencing http://guide.macports.org/#reference.variables
...
Are portpath, filesdir and filespath all pointing to Portfiles and
patchfiles (to be) downloaded as part of the install and post-
installation, are these retained locally even after the install? Is it
likewise for distpath in regard to distfiles?
The Portfile and patch files get downloaded into ${portpath}/$
{filedir} = ${portpath}/files or in other words
${prefix}/var/macports/sources/rsync.macports.org/release/ports/
<category>/<portname>/files
whereas distfiles are downloaded into some whole other location
${sysportpath}/distfiles/${dist_subdir}/
which do or don't need values to be set (they're undefined in the
guide)?
How does the (undefined) ${portbuildpath} relate to ${portpath} ...
does it involve a real temp directory "work" being created at the same
level as (or inside) "files" ?
Inside that 'work" subdirectory, is there a further subdirectory $
{worksrcdir} created, does it take a name that is relevant to any
understanding, and is it in here (= worksrcpath) that the files are
extracted, but only temporarily?
Extracted files and compiled source (when relevant) gets cleared out
from the above, and from destroot, after any resulting image (set of
files) had been relocated, plus all remaining phases of the install
completed?
"Destroot" -- please accept my apology that this remains confusing
because the Guide (in 5.2 above) defines it as a full path, and yet
includes "destroot" recursively within its own path as
destroot ... Value: ${workpath}/destroot
... another subdirectory within an actual "work" subdirectory?
... actually named "destroot" or taking a Portfile value from "name"?
... serving in part to allow port to "see" what goes into ${destroot}$
{prefix}/...
... specifies a location within which anything is "built"?
And the "image" that ends up in
/opt/local/var/macports/software/
... is it a full set of what got extracted, plus anything that got
built (in cases where there was a build phase), in other words is
everything that was downloaded in the tarballs (even if not everything
was immediately to be used, say various resources, docs, shell scripts
for possible later use by local admin) kept above under
/opt/local/var/macports/software/
For the actual destroot phase, if (in Debian) the procedure would
normally be to
- copy (+- remove extensions) two executables into /usr/bin
- copy (+- remove extensions) scripts into /usr/share/${name}/bin
- copy files into
/usr/share/locale
/usr/share/man/man1
/usr/share/doc/${name}
/usr/share/${name}/<other subdirs>
/etc/${name}/
do I just do all of the above in
destroot {
xinstall ...
}
and prepending ${prefix}
More information about the macports-users
mailing list