[Pkg-javascript-commits] [node-unicode-loose-match] 03/06: Use script instead of patch.

Bastien Roucariès rouca at moszumanska.debian.org
Fri Sep 8 15:03:10 UTC 2017


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

rouca pushed a commit to branch master
in repository node-unicode-loose-match.

commit 6f0342aecccd6e995255d6e0ab5e4e67b3fe2242
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Fri Sep 8 16:04:46 2017 +0200

    Use script instead of patch.
    
    Will allow ones to use build profiles
---
 debian/BinaryProperty.js            |  7 ++++---
 debian/patches/BinaryProperty.patch | 14 --------------
 debian/patches/series               |  1 -
 debian/rules                        | 13 +++++++------
 scripts/build.js                    |  2 +-
 5 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/debian/BinaryProperty.js b/debian/BinaryProperty.js
index f7baca8..c873f9f 100644
--- a/debian/BinaryProperty.js
+++ b/debian/BinaryProperty.js
@@ -1,5 +1,6 @@
 // This simple list avoids a whole package
-Binary_Property = [
+var main = {
+Binary_Property : [
 'Alphabetic',
 'Any',
 'ASCII',
@@ -65,5 +66,5 @@ Binary_Property = [
 'XID_Continue',
 'XID_Start',
 ]
-
-module.exports = Binary_Property
+};
+module.exports = main
diff --git a/debian/patches/BinaryProperty.patch b/debian/patches/BinaryProperty.patch
deleted file mode 100644
index c31be2a..0000000
--- a/debian/patches/BinaryProperty.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Use a simple list in a file instead of a whole package
-Author: Julien Puydt
-Forwarded: no
-
---- a/scripts/build.js
-+++ b/scripts/build.js
-@@ -1,6 +1,6 @@
- 'use strict';
- 
--const binaryProperties = require('unicode-9.0.0').Binary_Property;
-+const binaryProperties = require('../debian/BinaryProperty');
- const propertyAliases = require('unicode-property-aliases');
- const valueAliases = require('unicode-property-value-aliases');
- const jsesc = require('jsesc');
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 9d5bf8f..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-BinaryProperty.patch
diff --git a/debian/rules b/debian/rules
index d0dfac8..2086610 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,14 +3,15 @@
 %:
 	dh $@
 
-dist/script/build.js: script/build.js
-	mkdir -p $(notdir $@)
-	sed -E -e "s,require('unicode-([[:digit:]]+([.])?)+'),require('../../debian/BinaryProperty'),g" $< > $@
+dist/scripts/build.js: scripts/build.js
+	mkdir -p $(dir $@)
+	sed -E -e "s,require[(]'unicode-([[:digit:]]+([.])?)+'[)],require('../../debian/BinaryProperty'),g" "$<" > "$@"
 
-override_dh_auto_build:
+override_dh_auto_build: dist/scripts/build.js
 	mkdir -p dist/data
-	bash
-	(cd dist && node dist/scripts/build.js)
+	(cd dist && npm install unicode-property-aliases unicode-property-value-aliases)
+	(cd dist && node scripts/build.js)
 
 override_dh_auto_clean:
 	rm -rf dist
+	dh_auto_clean
diff --git a/scripts/build.js b/scripts/build.js
index 3193217..5f04028 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -1,6 +1,6 @@
 'use strict';
 
-const binaryProperties = require('../debian/BinaryProperty');
+const binaryProperties = require('unicode-9.0.0').Binary_Property;
 const propertyAliases = require('unicode-property-aliases');
 const valueAliases = require('unicode-property-value-aliases');
 const jsesc = require('jsesc');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-unicode-loose-match.git



More information about the Pkg-javascript-commits mailing list