pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43810: url2pkg needs to improved



The following reply was made to PR pkg/43810; it has been noted by GNATS.

From: "OBATA Akio" <obache%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/43810: url2pkg needs to improved
Date: Mon, 30 Aug 2010 09:18:34 +0900

 On Mon, 30 Aug 2010 04:10:00 +0900, <cheusov%tut.by@localhost> wrote:
 
 > 1)
 >    url2pkg http://<project>.googlecode.com/files/<tarball>.tbz
 >
 > initializes HOMEPAGE variables to http://<project>.googlecode.com/files/
 > It makes sense to change this to http://<project>.googlecode.com/
 
 My local patch for it:
 
 --- /usr/pkg/bin/url2pkg        2010-04-10 13:32:56.000000000 +0900
 +++ /home/obata/bin/url2pkg     2010-08-30 09:14:36.000000000 +0900
 @@ -281,6 +281,16 @@
          }
 
          if (!$found) {
 +               if ($url =~ qr"^http://([^.]*).googlecode\.com/files/(.*$)") {
 +                       my $pkgbase = $1;
 +                       $distfile = $2;
 +                       $master_sites = 
"http://${pkgbase}.googlecode.com/files/";;
 +                       $homepage = "http://code.google.com/p/${pkgbase}/";;
 +                       $found = true;
 +               }
 +       }
 +
 +       if (!$found) {
                  if ($url =~ qr"^(.*/)(.*)$") {
                          ($master_sites, $distfile) = ($1, $2);
                          $homepage = $master_sites;
 
 -- 
 OBATA Akio / obache%NetBSD.org@localhost
 


Home | Main Index | Thread Index | Old Index