pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/url2pkg/files url2pkg: add test for GitHub UR...
details: https://anonhg.NetBSD.org/pkgsrc/rev/aa460a6f42ac
branches: trunk
changeset: 453120:aa460a6f42ac
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun May 23 16:20:46 2021 +0000
description:
url2pkg: add test for GitHub URL that leads to wrong DISTNAME
Reported by Brook Milligan via private mail.
diffstat:
pkgtools/url2pkg/files/url2pkg_test.py | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diffs (42 lines):
diff -r 1e8991115ac2 -r aa460a6f42ac pkgtools/url2pkg/files/url2pkg_test.py
--- a/pkgtools/url2pkg/files/url2pkg_test.py Sun May 23 15:36:45 2021 +0000
+++ b/pkgtools/url2pkg/files/url2pkg_test.py Sun May 23 16:20:46 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: url2pkg_test.py,v 1.27 2020/10/17 22:39:01 rillig Exp $
+# $NetBSD: url2pkg_test.py,v 1.28 2021/05/23 16:20:46 rillig Exp $
import pytest
from url2pkg import *
@@ -431,6 +431,32 @@
]
+def test_Generator_adjust_site_GitHub_archive_tag():
+ url = 'https://github.com/org/proj/archive/refs/tags/1.0.0.tar.gz'
+
+ lines = Generator(url).generate_Makefile()
+ assert detab(lines) == [
+ mkcvsid,
+ '',
+ 'GITHUB_PROJECT= proj',
+ 'GITHUB_TAG= refs/tags/1.0.0',
+ # FIXME: DISTNAME must not contain slashes
+ 'DISTNAME= refs/tags/1.0.0',
+ 'PKGNAME= ${GITHUB_PROJECT}-${DISTNAME}',
+ 'CATEGORIES= pkgtools',
+ 'MASTER_SITES= ${MASTER_SITE_GITHUB:=org/}',
+ 'DIST_SUBDIR= ${GITHUB_PROJECT}',
+ '',
+ 'MAINTAINER= INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost',
+ 'HOMEPAGE= https://github.com/org/proj/',
+ 'COMMENT= TODO: Short description of the package',
+ '#LICENSE= # TODO: (see mk/license.mk)',
+ '',
+ '# url2pkg-marker (please do not remove this line.)',
+ ".include \"../../mk/bsd.pkg.mk\"",
+ ]
+
+
def test_Generator_adjust_site_GitHub_release__containing_project_name():
url = 'https://github.com/org/proj/releases/download/1.0.0/proj.zip'
Home |
Main Index |
Thread Index |
Old Index