[Pkg-javascript-commits] [node-unicode-tr51] 02/03: Build things in dist/

Julien Puydt julien.puydt at laposte.net
Thu Aug 24 20:02:24 UTC 2017


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

jpuydt-guest pushed a commit to branch master
in repository node-unicode-tr51.

commit b1d28e8f2710b5d139f7d7b8a5b48426f323979d
Author: Julien Puydt <julien.puydt at laposte.net>
Date:   Thu Aug 24 18:00:42 2017 +0200

    Build things in dist/
---
 debian/install                    | 10 +---------
 debian/patches/change_paths.patch | 28 ++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 debian/rules                      | 14 ++++++--------
 4 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/debian/install b/debian/install
index e5af4ec..642eba0 100644
--- a/debian/install
+++ b/debian/install
@@ -1,10 +1,2 @@
-Emoji.js usr/lib/nodejs/unicode-tr51/
-Emoji_Component.js usr/lib/nodejs/unicode-tr51/
-Emoji_Modifier.js usr/lib/nodejs/unicode-tr51/
-Emoji_Modifier_Base.js usr/lib/nodejs/unicode-tr51/
-Emoji_Presentation.js usr/lib/nodejs/unicode-tr51/
-Extended_Pictographic.js usr/lib/nodejs/unicode-tr51/
-emoji-version.js usr/lib/nodejs/unicode-tr51/
-index.js usr/lib/nodejs/unicode-tr51/
+dist/* usr/lib/nodejs/unicode-tr51/
 package.json usr/lib/nodejs/unicode-tr51/
-sequences.js usr/lib/nodejs/unicode-tr51/
diff --git a/debian/patches/change_paths.patch b/debian/patches/change_paths.patch
new file mode 100644
index 0000000..34ca380
--- /dev/null
+++ b/debian/patches/change_paths.patch
@@ -0,0 +1,28 @@
+Description: change paths in the scripts since we build in dist/
+Author: Julien Puydt
+Forwarded: no
+
+--- a/scripts/parse-emoji-data.js
++++ b/scripts/parse-emoji-data.js
+@@ -20,7 +20,7 @@
+ 
+ const parseEmojiData = function() {
+ 	const map = new Map();
+-	const source = fs.readFileSync('data/emoji-data.txt', 'utf8');
++	const source = fs.readFileSync('../data/emoji-data.txt', 'utf8');
+ 	if (!source) {
+ 		return;
+ 	}
+--- a/scripts/parse-emoji-sequences.js
++++ b/scripts/parse-emoji-sequences.js
+@@ -25,8 +25,8 @@
+ 	return sequences;
+ };
+ 
+-const sequences = parseEmojiSequences('data/emoji-sequences.txt')
+-	.concat(parseEmojiSequences('data/emoji-zwj-sequences.txt'));
++const sequences = parseEmojiSequences('../data/emoji-sequences.txt')
++	.concat(parseEmojiSequences('../data/emoji-zwj-sequences.txt'));
+ 
+ const writeData = function(fileName, data) {
+ 	fs.writeFileSync(
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a028e82
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+change_paths.patch
diff --git a/debian/rules b/debian/rules
index b84fb56..f503fbe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,15 +3,13 @@
 %:
 	dh $@
 
-.PHONY: data sequences
+override_dh_auto_build:
+	mkdir dist
+	(cd dist ; node ../scripts/parse-emoji-data.js)
+	(cd dist ; node ../scripts/parse-emoji-sequences.js)
 
-override_dh_auto_build: data sequences
-
-data:
-	node scripts/parse-emoji-data.js
-
-sequences:
-	node scripts/parse-emoji-sequences.js
+override_dh_auto_clean:
+	rm -rf dist
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
 override_dh_auto_test:

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



More information about the Pkg-javascript-commits mailing list