Writing portfiles: How to download a master.zip and not a master.zip.tar.gz

Clemens Lang cal at macports.org
Sun Sep 6 14:48:03 PDT 2015


----- On 6 Sep, 2015, at 23:33, Lars Sonchocky-Helldorf lars.sonchocky-helldorf at hamburg.de wrote:

> I have the following entries in a local portfile:
> -----
> homepage            http://torch.ch/
> master_sites        https://github.com/torch/torch7/archive/
> distname            master.zip
> -----

If you're using software from github, you should use the github PortGroup:

PortGroup    github 1.0
# Using a commit hash because the repo doesn't have tags
# You should ask upstream to tag releases
github.setup torch torch7 9e1b9dd15bbad3ee5cbd6440322ac3c3a368d631
# version defaults to the third argument of github.setup, but that's not
# monotonic, use a date instead.
version      2015-09-06

That should automatically set up master_sites and distname for you.

Clemens Lang

More information about the macports-users mailing list