Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_notify pkg_notify: update to 0.4.7.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/225d14836915
branches:  trunk
changeset: 437491:225d14836915
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Aug 24 13:43:40 2020 +0000

description:
pkg_notify: update to 0.4.7.

Improve github release detection.

diffstat:

 pkgtools/pkg_notify/Makefile         |   5 ++---
 pkgtools/pkg_notify/files/pkg_notify |  27 +++++++++++++--------------
 2 files changed, 15 insertions(+), 17 deletions(-)

diffs (61 lines):

diff -r 2cb8855d74d4 -r 225d14836915 pkgtools/pkg_notify/Makefile
--- a/pkgtools/pkg_notify/Makefile      Mon Aug 24 12:58:52 2020 +0000
+++ b/pkgtools/pkg_notify/Makefile      Mon Aug 24 13:43:40 2020 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.30 2019/08/11 13:22:36 wiz Exp $
+# $NetBSD: Makefile,v 1.31 2020/08/24 13:43:40 wiz Exp $
 
-PKGNAME=       pkg_notify-0.4.6
-PKGREVISION=   2
+PKGNAME=       pkg_notify-0.4.7
 CATEGORIES=    pkgtools
 
 MAINTAINER=    imil%gcu.info@localhost
diff -r 2cb8855d74d4 -r 225d14836915 pkgtools/pkg_notify/files/pkg_notify
--- a/pkgtools/pkg_notify/files/pkg_notify      Mon Aug 24 12:58:52 2020 +0000
+++ b/pkgtools/pkg_notify/files/pkg_notify      Mon Aug 24 13:43:40 2020 +0000
@@ -16,7 +16,7 @@
 #
 # $ pkg_notify category/package
 #
-# $Id: pkg_notify,v 1.5 2016/10/10 07:42:53 wiz Exp $
+# $Id: pkg_notify,v 1.6 2020/08/24 13:43:41 wiz Exp $
 
 use Net::FTP;
 use LWP::UserAgent;
@@ -576,23 +576,22 @@
        $master_site = $master_site."/".$hash."/$sfpkgdir";
     }
 
-    # github - look at releases page
-    if ($master_site =~ /github.com/) {
+    # github
+    if ($master_site =~ /github.com/ || $homepage =~ /github.com/) {
        my $project = `cd $pkgpath && $make show-var VARNAME=GITHUB_PROJECT`;
        chomp($project);
-       $master_site =~ s/(.*github.com\/[^\/]+)\/?/$1\/$project\/releases\//;
-       $distname = "v$version";
-       $dist = "v";
+       if ($master_site =~ /github.com/) {
+           # look at releases page
+           $master_site =~ s/(.*github.com\/[^\/]+)\/?/$1\/$project\/releases\//;
+       } else {
+           # homepage only - look at releases page
+           $master_site = $homepage . "/releases/";
+       }
+       $distname = `cd $pkgpath && $make show-var VARNAME=GITHUB_RELEASE`;
+       chomp($distname);
+       $dist = "";
     }
 
-    # github - homepage only - look at releases page
-    if ($homepage =~ /github.com/) {
-       my $project = `cd $pkgpath && $make show-var VARNAME=GITHUB_PROJECT`;
-       chomp($project);
-       $master_site = $homepage . "/releases/";
-       $distname = "v$version";
-       $dist = "v";
-    }
 
     if (($distname eq "") || ($master_site eq "")) {
        print "missing DISTNAME or MASTER_SITES for package $pkgname\n";



Home | Main Index | Thread Index | Old Index