pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg/files pkgtools/url2pkg: update Source...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7784a106db30
branches:  trunk
changeset: 399878:7784a106db30
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Aug 18 07:47:58 2019 +0000

description:
pkgtools/url2pkg: update SourceForge and GitHub to use https only

diffstat:

 pkgtools/url2pkg/files/url2pkg.pl |  28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)

diffs (80 lines):

diff -r e41297eec551 -r 7784a106db30 pkgtools/url2pkg/files/url2pkg.pl
--- a/pkgtools/url2pkg/files/url2pkg.pl Sun Aug 18 07:20:03 2019 +0000
+++ b/pkgtools/url2pkg/files/url2pkg.pl Sun Aug 18 07:47:58 2019 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: url2pkg.pl,v 1.53 2019/08/18 07:10:32 rillig Exp $
+# $NetBSD: url2pkg.pl,v 1.54 2019/08/18 07:47:58 rillig Exp $
 #
 
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -340,17 +340,17 @@
        }
        close(SITES) or die;
 
-       if ($url =~ qr"^http://(?:pr)?downloads\.sourceforge\.net/([^/]*)/([^/?]+)(?:\?(?:download|use_mirror=.*))?$") {
-               my $pkgbase = $1;
-               $distfile = $2;
+       if ($url =~ qr"^https://downloads\.sourceforge\.net/project/([^/?]+)/[^?]+/([^/?]+)(?:[?].*)?$") {
+               my ($project, $filename) = ($1, $2);
 
-               $master_sites = "\${MASTER_SITE_SOURCEFORGE:=${pkgbase}/}";
-               $homepage = "http://${pkgbase}.sourceforge.net/";;
+               $master_sites = "\${MASTER_SITE_SOURCEFORGE:=${project}/}";
+               $homepage = "https://${project}.sourceforge.net/";;
+               $distfile = $filename;
                $found = true;
        }
 
-       if ($url =~ qr"^https?://github\.com/") {
-               if ($url =~ qr"^https?://github\.com/(.*)/(.*)/archive/(.*)(\.tar\.gz|\.zip)$") {
+       if ($url =~ qr"^https://github\.com/";) {
+               if ($url =~ qr"^https://github\.com/(.*)/(.*)/archive/(.*)(\.tar\.gz|\.zip)$") {
                        my ($org, $proj, $tag, $ext) = ($1, $2, $3, $4);
 
                        $master_sites = "\${MASTER_SITE_GITHUB:=$org/}";
@@ -363,7 +363,7 @@
                        $distfile = "$tag$ext";
                        $found = true;
 
-               } elsif ($url =~ qr"^https?://github\.com/(.*)/(.*)/releases/download/(.*)/(.*)(\.tar\.gz|\.zip)$") {
+               } elsif ($url =~ qr"^https://github\.com/(.*)/(.*)/releases/download/(.*)/(.*)(\.tar\.gz|\.zip)$") {
                        my ($org, $proj, $tag, $base, $ext) = ($1, $2, $3, $4, $5);
 
                        $master_sites = "\${MASTER_SITE_GITHUB:=$org/}";
@@ -496,7 +496,7 @@
        adjust_po();
        adjust_use_languages();
 
-       print("url2pkg> Adjusting the Makefile.\n");
+       print("url2pkg> Adjusting the Makefile\n");
 
        my @lines;
 
@@ -569,13 +569,11 @@
        if (scalar(@extract_cookie) == 0) {
                if (scalar(@ARGV) == 0) {
                        print("URL: ");
-                       # Pressing Ctrl-D is considered equivalent to
-                       # aborting the process.
                        if (!defined($url = <STDIN>)) {
                                print("\n");
-                               print("No URL given -- aborting.\n");
                                exit(0);
                        }
+                       chomp($url);
                } else {
                        $url = shift(@ARGV);
                }
@@ -588,9 +586,9 @@
        adjust_package_from_extracted_distfiles();
 
        print("\n");
-       print("Remember to correct CATEGORIES, HOMEPAGE, COMMENT, and DESCR when you're done!\n");
+       print("Remember to run pkglint when you're done.\n");
+       print("See ../../doc/pkgsrc.txt to get some help.\n");
        print("\n");
-       print("Good luck! (See pkgsrc/doc/pkgsrc.txt for some more help :-)\n");
 }
 
 main() unless caller();



Home | Main Index | Thread Index | Old Index