Need help to write master_sites in the correct way

Abdulrahman Alshammari a.turqi at hotmail.com
Wed Mar 30 13:56:43 PDT 2016


Done. Thanks for your support, Mojca Miklavec
> On Mar 30, 2016, at 4:54 PM, Abdulrahman Alshammari <a.turqi at hotmail.com> wrote:
> 
> I really appreciate your support. It is completely about my concern. Awesome solutions.
> Thanks a lot
> 
>> On Mar 30, 2016, at 1:06 PM, Mojca Miklavec <mojca at macports.org <mailto:mojca at macports.org>> wrote:
>> 
>> 
>> On 30 March 2016 at 18:45, Abdulrahman Alshammari wrote:
>> > Hey,
>> >
>> > The software that I want to build a port for is getting updated 3-5 times in
>> > a year. So, I need to build the portfile in a way that will be easy to
>> > update. So let me explain my issue.
>> >
>> > The homepage of the software is here:
>> > http://vsl.cis.udel.edu/civl/index.html <http://vsl.cis.udel.edu/civl/index.html>
>> >
>> > For download, this is the list of software versions:
>> > http://vsl.cis.udel.edu/lib/sw/civl/ <http://vsl.cis.udel.edu/lib/sw/civl/>
>> >
>> > For each version, there are sub-versions start with rXXXX, Like in the
>> > latest version I want to build a port for it:
>> > 1.6 ->> r2872 >> downloads >> we get this page:
>> >
>> > http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html <http://vsl.cis.udel.edu/lib/sw/civl/1.6/r2872/release/index.html>
>> >
>> > Then, I need to download  the file CIVL-1.6_2872.tgz
>> >
>> > Any suggestion how can I handle this, so when I need to update the port, I
>> > just update a little bit in the portfile?
>> 
>> You have two options:
>> 
>> (1) either you specify "version 1.6_2872" and then automatically split it with some tcl tricks (I wrote the most dumb one, I'm sure there is a more elegant way to do it)
>> 
>> name                civl
>> version             1.6_2872
>> 
>> set version_major   [lindex [split ${version} _] 0]
>> set version_minor   [lindex [split ${version} _] 1]
>> 
>> extract.suffix      .tgz
>> distname            CIVL-${version}
>> 
>> master_sites        http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release <http://vsl.cis.udel.edu/lib/sw/${name}/${version_major}/r${version_minor}/release>
>> 
>> checksums           rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
>>                     sha256  b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8
>> 
>> 
>> (2) or simply do the following:
>> 
>> name            civl
>> version         1.6
>> set rev         2872
>> 
>> extract.suffix  .tgz
>> distname        CIVL-${version}_${rev}
>> 
>> master_sites    http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release <http://vsl.cis.udel.edu/lib/sw/${name}/${version}/r${rev}/release>
>> 
>> checksums       rmd160  f9c755e26c7d3e2b4a5a29d4008c86551abda33b \
>>                 sha256  b90db06b5f390b2888e0d3d9e25d68b77373a1e34ca20c73bfcef322708ff4c8
>> 
>> It dependes whether you want the revision to be part of the reported version or not. If the revision number is relevant and version 1.6 would be also released under different revisions (= subversions) after some time, you should probably use the first approach. If users only really care about "1.6", then you can increase the "revision" in Portfile by one when the next "sub-version" gets released.
>> 
>> Mojca
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20160330/6a8daa74/attachment.html>


More information about the macports-dev mailing list