summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrodent <rodent@pkgsrc.org>2014-06-25 12:15:10 +0000
committerrodent <rodent@pkgsrc.org>2014-06-25 12:15:10 +0000
commitc63f01b88a1eec47c92846fd2a46e0a46902ccea (patch)
tree1ee774861079a2c5aea8d30e502ab856289ae330 /pkgtools
parent9f1bb8885a3fd1fbb16f41f2ff1a5c5c105a058b (diff)
downloadpkgsrc-c63f01b88a1eec47c92846fd2a46e0a46902ccea.tar.gz
Don't set EXTRACT_SUFX if it's .gem. Change if statement to use a switch
and exclude ${WRKDIR}/.gemspec from WRKSRC candidates. Bump PKGVERSION.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/url2pkg/Makefile5
-rw-r--r--pkgtools/url2pkg/files/url2pkg.pl13
2 files changed, 11 insertions, 7 deletions
diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile
index 52210d9a486..540f417dcca 100644
--- a/pkgtools/url2pkg/Makefile
+++ b/pkgtools/url2pkg/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.73 2014/05/29 23:37:15 wiz Exp $
+# $NetBSD: Makefile,v 1.74 2014/06/25 12:15:10 rodent Exp $
#
-PKGNAME= url2pkg-2.19
-PKGREVISION= 1
+PKGNAME= url2pkg-2.20
CATEGORIES= pkgtools
MAINTAINER= pkgsrc-users@NetBSD.org
diff --git a/pkgtools/url2pkg/files/url2pkg.pl b/pkgtools/url2pkg/files/url2pkg.pl
index 92fa3e7cf58..126f78b82d9 100644
--- a/pkgtools/url2pkg/files/url2pkg.pl
+++ b/pkgtools/url2pkg/files/url2pkg.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: url2pkg.pl,v 1.24 2014/05/08 10:35:58 rodent Exp $
+# $NetBSD: url2pkg.pl,v 1.25 2014/06/25 12:15:10 rodent Exp $
#
# Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,6 +36,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+use feature qw{ switch };
use strict;
use warnings;
@@ -330,7 +331,7 @@ sub generate_initial_package($) {
["DISTNAME", $distname],
["CATEGORIES", $category],
["MASTER_SITES", $master_sites],
- ($dist_sufx ne ".tar.gz"
+ (($dist_sufx ne ".tar.gz" && $dist_sufx ne ".gem")
? ["EXTRACT_SUFX", $dist_sufx]
: ())
]);
@@ -372,8 +373,12 @@ sub adjust_package_from_extracted_distfiles()
my @files = ();
opendir(WRKDIR, $abs_wrkdir) or die;
while (defined(my $f = readdir(WRKDIR))) {
- next if ($f =~ qr"^\." || $f eq 'pax_global_header');
- push(@files, $f);
+ given ($f) {
+ next when qr"^\.";
+ next when 'pax_global_header';
+ next when qr".*\.gemspec";
+ default { push(@files, $f) }
+ }
}
closedir(WRKDIR);
if (@files == 1) {