Writing a portfile for a single script

Joshua Root jmr at macports.org
Tue Jan 15 14:35:03 PST 2013


On 2013-1-16 09:22 , Lawrence Velázquez wrote:
> On Jan 15, 2013, at 5:05 PM, 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               {}
>> }}}
>>
>> Another option would be to wrap the script in a tarball and host that
>> somewhere? Thanks in advance for any tips!
> 
> As per the Guide, the usual way to eliminate a phase is to define it to be empty.
> 
> http://guide.macports.org/chunked/development.examples.html#development.examples.eliminate

If you eliminate the extract phase, there will be nothing in the
workpath. You could technically install straight from distpath to
destroot, but that's a little confusing.

This would probably be better:

distfiles	name_of_script
extract { file copy ${distpath}/${distfiles} ${workpath} }
use_configure       no
build	{}
...

- Josh


More information about the macports-dev mailing list