Writing a portfile for a single script
Sean Farley
sean at macports.org
Wed Jan 16 11:56:05 PST 2013
On Tue, Jan 15, 2013 at 4:35 PM, Joshua Root <jmr at macports.org> wrote:
> 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 {}
Thanks for the help, everyone! I liked Josh's way of using extract to
copy to the ${distfiles} to the ${workpath}, so I ended up going with
that. Should this go into
<https://trac.macports.org/wiki/PortfileRecipes>? If so, would it be
ok for me to add it or should a better wordsmith do that?
More information about the macports-dev
mailing list