summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrodent <rodent>2014-06-25 12:15:10 +0000
committerrodent <rodent>2014-06-25 12:15:10 +0000
commitf8aa83588b7c147e88f5d5f65448a71ec40f168a (patch)
tree1ee774861079a2c5aea8d30e502ab856289ae330 /pkgtools
parentdedf94e2ffbfc8e210c9b4e5db6c99fbe0f37c10 (diff)
downloadpkgsrc-f8aa83588b7c147e88f5d5f65448a71ec40f168a.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) {