pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/pkg_notify



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Sep 20 11:25:42 UTC 2020

Modified Files:
        pkgsrc/pkgtools/pkg_notify: Makefile
        pkgsrc/pkgtools/pkg_notify/files: pkg_notify

Log Message:
pkg_notify: update to 0.4.8.

Fix improved github handling.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/pkgtools/pkg_notify/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/pkgtools/pkg_notify/files/pkg_notify

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkg_notify/Makefile
diff -u pkgsrc/pkgtools/pkg_notify/Makefile:1.32 pkgsrc/pkgtools/pkg_notify/Makefile:1.33
--- pkgsrc/pkgtools/pkg_notify/Makefile:1.32    Mon Aug 31 18:10:58 2020
+++ pkgsrc/pkgtools/pkg_notify/Makefile Sun Sep 20 11:25:41 2020
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2020/08/31 18:10:58 wiz Exp $
+# $NetBSD: Makefile,v 1.33 2020/09/20 11:25:41 wiz Exp $
 
-PKGNAME=       pkg_notify-0.4.7
-PKGREVISION=   1
+PKGNAME=       pkg_notify-0.4.8
 CATEGORIES=    pkgtools
 
 MAINTAINER=    imil%gcu.info@localhost
@@ -23,7 +22,7 @@ CONF_FILES=           ${EGDIR}/${PKGBASE}.list \
 .include "../../mk/bsd.prefs.mk"
 
 SUBST_CLASSES+=                        pkg_notify
-SUBST_STAGE.pkg_notify=                pre-install
+SUBST_STAGE.pkg_notify=                build
 SUBST_FILES.pkg_notify=                pkg_notify
 SUBST_FILES.pkg_notify+=       pkg_notify.1
 SUBST_VARS.pkg_notify=         PKGSRCDIR

Index: pkgsrc/pkgtools/pkg_notify/files/pkg_notify
diff -u pkgsrc/pkgtools/pkg_notify/files/pkg_notify:1.6 pkgsrc/pkgtools/pkg_notify/files/pkg_notify:1.7
--- pkgsrc/pkgtools/pkg_notify/files/pkg_notify:1.6     Mon Aug 24 13:43:41 2020
+++ pkgsrc/pkgtools/pkg_notify/files/pkg_notify Sun Sep 20 11:25:41 2020
@@ -16,7 +16,7 @@
 #
 # $ pkg_notify category/package
 #
-# $Id: pkg_notify,v 1.6 2020/08/24 13:43:41 wiz Exp $
+# $Id: pkg_notify,v 1.7 2020/09/20 11:25:41 wiz Exp $
 
 use Net::FTP;
 use LWP::UserAgent;
@@ -125,7 +125,6 @@ sub find_version {
        my $wasbad = 0;
 
        if ($line =~ /([^0-9a-z]$dist|^$dist)([^\/\"<>\@]+)$extract_sufx/) {
-
            $realdist = $dist.$2.$extract_sufx;
            my $lsvers = $2;
 
@@ -494,6 +493,33 @@ sub sort_master_sites {
 # used to record last connection
 my $last_master_host = "";
 
+sub compute_dist_and_version {
+    my ($major, $minor, $distname) = @_;
+
+    my $nostrip = 0;
+    # nice archive, has a comprehensive versioning
+    if (defined($minor) && ($distname =~ /(.+?)($major[\._]?$minor.*$)/)) {
+       $dist = $1;
+       $version = $2;
+       $nicearc = 1;
+       # archive appears to only have a major
+    } elsif (defined($major) && ($distname =~ /(.+)($major.*)/)) {
+       $dist = $1;
+       $version = $2;
+       # ok, archive versioning is a pure mess
+       # assume version is everything not being PKGNAME
+    } else {
+       $dist = $pkgname;
+       $version = $distname;
+       $version =~ s/$pkgname//;
+
+       # don't strip extensions
+       $nostrip = 1;
+    }
+
+    return $nostrip;
+}
+    
 foreach (@packages) {
     chomp;
 
@@ -522,26 +548,7 @@ foreach (@packages) {
     # will we strip version numbers from extensions ?
     my $nostrip = 0;
 
-    $nicearc = 0;
-    # nice archive, has a comprehensive versioning
-    if (defined($minor) && ($distname =~ /(.+?)($major[\._]?$minor.*$)/)) {
-       $dist = $1;
-       $version = $2;
-       $nicearc = 1;
-       # archive appears to only have a major
-    } elsif (defined($major) && ($distname =~ /(.+)($major.*)/)) {
-       $dist = $1;
-       $version = $2;
-       # ok, archive versioning is a pure mess
-       # assume version is everything not being PKGNAME
-    } else {
-       $dist = $pkgname;
-       $version = $distname;
-       $version =~ s/$pkgname//;
-
-       # don't strip extensions
-       $nostrip = 1;
-    }
+    $nostrip = compute_dist_and_version($major, $minor, $distname);
 
     # MASTER_SITES is MASTER_SITE_LOCAL, skip
     if (file_rx_check("$pkgpath/Makefile",
@@ -587,9 +594,20 @@ foreach (@packages) {
            # homepage only - look at releases page
            $master_site = $homepage . "/releases/";
        }
+       my $olddistname = $distname;
+       # override distname, which is usually a nicer package name version
        $distname = `cd $pkgpath && $make show-var VARNAME=GITHUB_RELEASE`;
        chomp($distname);
-       $dist = "";
+       if ($distname eq "") {
+           $distname = `cd $pkgpath && $make show-var VARNAME=GITHUB_TAG`;
+           chomp($distname);
+       }
+       if ($distname eq "") {
+           # revert to previous value
+           $distname = $olddistname;
+       }
+       # update
+       $nostrip = compute_dist_and_version($major, $minor, $distname);
     }
 
 



Home | Main Index | Thread Index | Old Index