[Pkg-javascript-commits] [npm2deb] 01/03: bump standards, blacklist files

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sun Jul 30 12:18:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository npm2deb.

commit 7806daf0f760a28137c34ac0ecb7aa69f77502c6
Author: Pirate Praveen <praveen at debian.org>
Date:   Sun Jul 30 17:31:45 2017 +0530

    bump standards, blacklist files
---
 debian/patches/blacklist-files.patch | 61 ++++++++++++++++++++++++++++++++++++
 debian/patches/bump-standards.patch  | 22 +++++++++++++
 debian/patches/series                |  2 ++
 3 files changed, 85 insertions(+)

diff --git a/debian/patches/blacklist-files.patch b/debian/patches/blacklist-files.patch
new file mode 100644
index 0000000..dfeadfe
--- /dev/null
+++ b/debian/patches/blacklist-files.patch
@@ -0,0 +1,61 @@
+From 1f9e8bad04c729e3781a0aec7ec3ab4c65f258bb Mon Sep 17 00:00:00 2001
+From: Shanavas M <shanavas.m2 at gmail.com>
+Date: Sun, 16 Jul 2017 22:34:04 +0300
+Subject: [PATCH] Exclude unwanted files from debian/install
+
+npm includes a lot of files like licence, changelog, etc... that are
+not supposed to be shipped in /usr/lib/<package>/ or at all.
+---
+ npm2deb/__init__.py |  3 ++-
+ npm2deb/utils.py    | 17 +++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/npm2deb/__init__.py b/npm2deb/__init__.py
+index 3f7c187..56b515a 100644
+--- a/npm2deb/__init__.py
++++ b/npm2deb/__init__.py
+@@ -236,7 +236,8 @@ def create_install(self):
+         libs.remove('debian')
+ 
+         for filename in libs:
+-            content += "%s %s/\n" % (filename, self.debian_dest)
++            if not utils.is_ignored(filename):
++                content += "%s %s/\n" % (filename, self.debian_dest)
+         utils.create_debian_file('install', content)
+ 
+     def create_docs(self):
+diff --git a/npm2deb/utils.py b/npm2deb/utils.py
+index ba4711a..59166b9 100644
+--- a/npm2deb/utils.py
++++ b/npm2deb/utils.py
+@@ -9,6 +9,16 @@
+ 
+ 
+ DEBUG_LEVEL = 0
++# files starting with this strings will not be included in debian/install
++IGNORED_FILES = [
++    '.',                                  # dotfiles
++    'readme',                             # readme
++    'history', 'changelog',               # history files
++    'license', 'copyright', 'licence',    # legal files
++    'gruntfile', 'gulpfile', 'makefile',  # buid system files
++    'karma.conf', 'bower.json',
++    'test'                                # test files
++]
+ 
+ def debug(level, msg):
+     if level <= DEBUG_LEVEL:
+@@ -19,6 +29,13 @@ def get_npm_version(module_name):
+     return _getstatusoutput(
+         'npm view "%s" version' % module_name)[1].split('\n')[-2].strip()
+ 
++def is_ignored(filename):
++    filename = filename.lower()
++    for pattern in IGNORED_FILES:
++        if filename.startswith(pattern):
++            return True
++
++    return False
+ 
+ def get_template(filename):
+     result = None
diff --git a/debian/patches/bump-standards.patch b/debian/patches/bump-standards.patch
new file mode 100644
index 0000000..ff4d70a
--- /dev/null
+++ b/debian/patches/bump-standards.patch
@@ -0,0 +1,22 @@
+From 6d77d1bcba65a49c7cbe44db6cb988f441b7b4a7 Mon Sep 17 00:00:00 2001
+From: Shanavas M <shanavas at disroot.org>
+Date: Mon, 10 Jul 2017 16:58:11 +0300
+Subject: [PATCH] bump Standards-Version to 4.0.0
+
+---
+ npm2deb/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/npm2deb/__init__.py b/npm2deb/__init__.py
+index 3f7c187..9586ffb 100644
+--- a/npm2deb/__init__.py
++++ b/npm2deb/__init__.py
+@@ -14,7 +14,7 @@
+ 
+ VERSION = '0.2.6'
+ DEBHELPER = 9
+-STANDARDS_VERSION = '3.9.8'
++STANDARDS_VERSION = '4.0.0'
+ 
+ 
+ class Npm2Deb(object):
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3a24d80
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+bump-standards.patch
+blacklist-files.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/npm2deb.git



More information about the Pkg-javascript-commits mailing list