Writing a portfile for a single script

Ryan Schmidt ryandesign at macports.org
Tue Jan 15 14:23:42 PST 2013


On Jan 15, 2013, at 16:05, Sean Farley <sean at macports.org> wrote:

> I'm looking for advice / best practices for bypassing the extract
> phase when writing a portfile for a script (and hence it's not a
> tarball). One idea I had was something like the following,
> 
> {{{
> distname            ${name}
> extract.suffix
> use_configure       no
> 
> extract             {}
> build               {}
> }}}

That sounds reasonable. Then in the destroot block, install it where it needs to go.

Don't forget "supported_archs noarch".

If you'll be wanting to modify the script before installation (e.g. changing the shebang line) you could use the extract block to copy the script to the worksrcpath (which you could create using "extract.mkdir yes"), then use the patch block to reinplace the script (or write a patchfile).




More information about the macports-dev mailing list