Description: various updates
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2021-11-21

--- a/npm2deb/__init__.py
+++ b/npm2deb/__init__.py
@@ -13,8 +13,8 @@
 from npm2deb.mapper import Mapper
 
 VERSION = '0.3.0'
-DEBHELPER = 11
-STANDARDS_VERSION = '4.3.0'
+DEBHELPER = 13
+STANDARDS_VERSION = '4.6.0'
 
 
 class Npm2Deb(object):
@@ -76,7 +76,6 @@
         self.create_copyright()
         self.create_control()
         self.create_docs()
-        self.create_install()
         self.create_links()
         self.create_dirs()
         self.create_examples()
@@ -265,17 +264,6 @@
             content = '\n'.join(links)
             utils.create_debian_file('links', content)
 
-    def create_install(self):
-        content = ''
-        libs = _os.listdir()
-        # remove debian directory
-        libs.remove('debian')
-
-        for filename in libs:
-            if not utils.is_ignored(filename):
-                content += "%s %s/\n" % (filename, self.debian_dest)
-        utils.create_debian_file('install', content)
-
     def create_docs(self):
         docs = []
         if 'readmeFilename' in self.json and self.json['readmeFilename']:
@@ -365,7 +353,6 @@
         utils.create_dir("debian")
         utils.create_dir("debian/source")
         utils.create_debian_file("source/format", "3.0 (quilt)\n")
-        utils.create_debian_file("compat", self.debian_debhelper)
 
     def read_package_info(self):
         data = None
@@ -557,7 +544,7 @@
             self.homepage = utils.get_npmjs_homepage(self.name)
 
     def _get_Depends(self):
-        depends = ['nodejs (>= 6)']
+        depends = []
         mapper = Mapper.get_instance()
         if 'dependencies' in self.json:
             dependencies = self.json['dependencies']
--- a/npm2deb/templates.py
+++ b/npm2deb/templates.py
@@ -25,13 +25,13 @@
 Uploaders: %(Uploaders)s
 Testsuite: autopkgtest-pkg-nodejs
 Build-Depends:
- debhelper (>= %(debhelper)s)
- , nodejs (>= 6)
- , pkg-js-tools
+ debhelper-compat (= %(debhelper)s)
+ , dh-sequence-nodejs
 Standards-Version: %(Standards-Version)s
 Homepage: %(Homepage)s
 Vcs-Git: %(Vcs-Git)s
 Vcs-Browser: %(Vcs-Browser)s
+Rules-Requires-Root: no
 
 Package: %(Package)s
 Architecture: all
@@ -48,7 +48,7 @@
 #export DH_VERBOSE=1
 
 %%:
-	dh $@ --with nodejs
+	dh $@
 
 #override_dh_auto_build:
 
@@ -323,8 +323,8 @@
 WATCH['github'] = """version=4
 opts=\\
 dversionmangle=%(dversionmangle)s,\\
-filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/%(debian_name)s-$1.tar.gz/ \\
- %(url)s/releases .*/archive/v?([\d\.]+).tar.gz
+filenamemangle=s/.*?(\d[\d\.-]*@ARCHIVE_EXT@)/%(debian_name)s-$1/ \\
+ %(url)s/releases .*/archive.*/v?([\d\.]+).tar.gz
 """
 
 WATCH['gitlab'] = """version=4
@@ -347,8 +347,8 @@
 METADATA['github'] = """---
 Archive: GitHub
 Bug-Database: %(url)s/issues
-Contact: %(url)s/issues
-Name: %(module)s
+Bug-Submit: %(url)s/issues/new
+Changelog: %(url)s/tags
 Repository: %(url)s.git
 Repository-Browse: %(url)s
 """
@@ -356,8 +356,8 @@
 METADATA['gitlab'] = """---
 Archive: GitLab
 Bug-Database: %(url)s/issues
-Contact: %(url)s/issues
-Name: %(module)s
+Bug-Submit: %(url)s/issues/new
+Changelog: %(url)s/tags
 Repository: %(url)s.git
 Repository-Browse: %(url)s
 """
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -89,10 +89,6 @@
         if os.path.isdir('debian'):
             rmtree('debian')
 
-    def _get_compat(self):
-        with open('debian/compat', 'r') as compat_fd:
-            return compat_fd.read().strip('\n')
-
     def _get_file_line(self, filename, what):
         result = None
         with open(filename, 'r') as file_fd:
@@ -109,18 +105,16 @@
         n = Npm2Deb('parse-url')
         n.create_base_debian()
         n.create_control()
-        self.assertEqual(self._get_compat(), str(DEBHELPER))
         self.assertEqual(self._get_debfile_line("control",
-                                                " debhelper ("), ' debhelper (>= %s)' % DEBHELPER)
+                                                " debhelper-compat ("), ' debhelper-compat (= %s)' % DEBHELPER)
 
     def test_debhelper_as_argument(self):
         MY_DEBHELPER = DEBHELPER + 1
         n = Npm2Deb('parse-url', {'debhelper': MY_DEBHELPER})
         n.create_base_debian()
         n.create_control()
-        self.assertEqual(self._get_compat(), str(MY_DEBHELPER))
-        self.assertEqual(self._get_debfile_line("control", " debhelper ("),
-                         ' debhelper (>= %s)' % MY_DEBHELPER)
+        self.assertEqual(self._get_debfile_line("control", " debhelper-compat ("),
+                         ' debhelper-compat (= %s)' % MY_DEBHELPER)
 
     def test_manpages(self):
         n = Npm2Deb('jade')
