source: trunk/dports/_resources/port1.0/livecheck/googlecode.tcl @ 97765

Last change on this file since 97765 was 97765, checked in by and.damore@…, 7 years ago

resources: stricter livecheck matching for googlecode, previously it was matching a trailing '" onclick='

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 970 bytes
Line 
1# $Id: googlecode.tcl 97765 2012-09-14 19:44:43Z and.damore@macports.org $
2#
3# This file contains the defaults for googlecode.
4
5if {${livecheck.name} eq "default"} {
6    # Extract the googlecode project name from the homepage, if possible
7    if {$has_homepage
8        && ([regexp {^http://code.google.com/p/([^/]+)} $homepage _ tag]
9            || [regexp {^http://(.*).googlecode.com} $homepage _ tag])} {
10        set livecheck.name $tag
11    } else {
12        # Otherwise, fall back on the port name
13        set livecheck.name $name
14    }
15}
16if {!$has_homepage || ${livecheck.url} eq ${homepage}} {
17    set livecheck.url "http://code.google.com/p/${livecheck.name}/downloads/list"
18}
19if {${livecheck.distname} eq "default"} {
20    set livecheck.distname [regsub ***=[quotemeta ${livecheck.version}] [quotemeta [file tail [lindex ${distfiles} 0]]] (\[^\"'\]+)]
21}
22if {${livecheck.regex} eq ""} {
23    set livecheck.regex [list "href=\"//[quotemeta ${livecheck.name}].googlecode.com/files/${livecheck.distname}\""]
24}
25set livecheck.type "regex"
Note: See TracBrowser for help on using the repository browser.