[Pkg-javascript-commits] [node-unicode-data] 02/02: Initial packaging
Julien Puydt
julien.puydt at laposte.net
Wed Sep 6 17:41:31 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-data.
commit 2960cdb4332cb098c5b26888497196327d405898
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Thu Aug 24 18:57:18 2017 +0200
Initial packaging
---
debian/README.source | 15 +++++++++++++++
debian/changelog | 5 +++++
debian/compat | 1 +
debian/control | 30 +++++++++++++++++++++++++++++
debian/copyright | 12 ++++++++++++
debian/docs | 1 +
debian/install | 1 +
debian/patches/debian_resources.patch | 10 ++++++++++
debian/patches/don_t_ship_unneeded.patch | 33 ++++++++++++++++++++++++++++++++
debian/patches/series | 3 +++
debian/patches/use_fs_extra_for_cp | 20 +++++++++++++++++++
debian/resources.js | 22 +++++++++++++++++++++
debian/rules | 27 ++++++++++++++++++++++++++
debian/source/format | 1 +
debian/tests/control | 2 ++
debian/tests/require | 3 +++
16 files changed, 186 insertions(+)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..dde15cd
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,15 @@
+How to get the sources?
+=======================
+
+Upstream doesn't want to tag release : he runs the scripts, obtains unicode-*
+packages, commits them and gives them versions.
+
+So to get something useful, we take a git commit and use it to generate the
+package ; with the following modifications:
+- remove .git/
+- remove data/ (which means we have our own resources.js)
+
+Notice that at the moment, I am packaging an old commit, because there are
+less dependencies -- and more interestingly, a dependency loop! The goal is
+to get node-unicode-10.0.0 from that old commit, which will then allow working
+on packages for the deps, and then a more recent commit.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..81c3a48
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+node-unicode-data (0~20170824+git833a20b-1) UNRELEASED; urgency=medium
+
+ * Initial release. (Closes: #872697)
+
+ -- Julien Puydt <julien.puydt at laposte.net> Thu, 24 Aug 2017 18:54:45 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ba2023f
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: node-unicode-data
+Section: javascript
+Priority: optional
+Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
+Uploaders: Julien Puydt <julien.puydt at laposte.net>
+Build-Depends: debhelper (>= 10),
+ node-fs-extra (>= 4.0.0),
+ node-jsesc (>= 1.2.0),
+ node-lodash-packages (>= 4.2.4),
+ node-mkdirp (>= 0.5.0),
+ node-regenerate (>= 1.2.1),
+ node-request (>= 2.26.1),
+ node-unicode-property-aliases (>= 1.0.0),
+ node-unicode-property-value-aliases (>= 1.0.1),
+ node-when (>= 3.7.7),
+ nodejs
+Standards-Version: 4.1.0
+Homepage: https://github.com/mathiasbynens/node-unicode-data
+Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-unicode-data.git
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-unicode-data.git
+
+Package: node-unicode-10.0.0
+Architecture: all
+Depends: nodejs, ${misc:Depends}
+Description: Unicode 10.0.0 data for Node.js
+ JavaScript-compatible Unicode data. Arrays of code points, arrays of symbols,
+ and regular expressions for Unicode v10.0.0’s categories, scripts, blocks,
+ bidi, and other properties.
+ .
+ Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..410a2f1
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,12 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: node-unicode-data
+Upstream-Contact: https://github.com/mathiasbynens/node-unicode-data/issues
+Source: https://github.com/mathiasbynens/node-unicode-data
+
+Files: *
+Copyright: 2013-2017 Mathias Bynens
+License: Expat
+
+Files: debian/*
+Copyright: 2017 Julien Puydt
+License: Expat
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..6ff1cc6
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+output/* usr/lib/nodejs/
diff --git a/debian/patches/debian_resources.patch b/debian/patches/debian_resources.patch
new file mode 100644
index 0000000..9de7a5b
--- /dev/null
+++ b/debian/patches/debian_resources.patch
@@ -0,0 +1,10 @@
+--- a/scripts/generate-data.js
++++ b/scripts/generate-data.js
+@@ -1,6 +1,6 @@
+ 'use strict';
+
+-const resources = require('../data/resources.js');
++const resources = require('../debian/resources.js');
+ const generateData = require('../index.js');
+ const utils = require('../scripts/utils.js');
+
diff --git a/debian/patches/don_t_ship_unneeded.patch b/debian/patches/don_t_ship_unneeded.patch
new file mode 100644
index 0000000..865aad9
--- /dev/null
+++ b/debian/patches/don_t_ship_unneeded.patch
@@ -0,0 +1,33 @@
+--- a/index.js
++++ b/index.js
+@@ -97,14 +97,6 @@
+ }
+ });
+ fs.writeFileSync(
+- path.resolve(__dirname, 'output', 'unicode-' + version, 'README.md'),
+- compileReadMe({
+- 'version': version,
+- 'dirs': dirMap,
+- 'regenerateExample': '<%= set.toString() %>'
+- })
+- );
+- fs.writeFileSync(
+ path.resolve(__dirname, 'output', 'unicode-' + version, 'index.js'),
+ compileIndex({ 'version': version, 'data': jsesc(dirMap) })
+ );
+@@ -112,15 +104,6 @@
+ path.resolve(__dirname, 'output', 'unicode-' + version, 'package.json'),
+ compilePackage({ 'version': version })
+ );
+- [
+- '.gitattributes',
+- '.gitignore'
+- ].forEach(function(file) {
+- copySync(
+- path.resolve(staticPath, file),
+- path.resolve(__dirname, 'output', 'unicode-' + version, file)
+- );
+- });
+ return dirMap;
+ };
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cd194b4
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+debian_resources.patch
+use_fs_extra_for_cp
+don_t_ship_unneeded.patch
diff --git a/debian/patches/use_fs_extra_for_cp b/debian/patches/use_fs_extra_for_cp
new file mode 100644
index 0000000..0faab40
--- /dev/null
+++ b/debian/patches/use_fs_extra_for_cp
@@ -0,0 +1,20 @@
+--- a/index.js
++++ b/index.js
+@@ -8,7 +8,7 @@
+ parsers.parseCaseFolding = require('./scripts/parse-case-folding.js');
+ parsers.parseScriptExtensions = require('./scripts/parse-script-extensions.js');
+ const extend = utils.extend;
+-const cp = require('cp');
++const copySync = require('fs-extra').copySync;
+ const jsesc = require('jsesc');
+ const template = require('lodash.template');
+
+@@ -116,7 +116,7 @@
+ '.gitattributes',
+ '.gitignore'
+ ].forEach(function(file) {
+- cp.sync(
++ copySync(
+ path.resolve(staticPath, file),
+ path.resolve(__dirname, 'output', 'unicode-' + version, file)
+ );
diff --git a/debian/resources.js b/debian/resources.js
new file mode 100644
index 0000000..2afbb07
--- /dev/null
+++ b/debian/resources.js
@@ -0,0 +1,22 @@
+var resources = [
+ {
+ 'version': '10.0.0',
+ 'main': '/usr/share/unicode/UnicodeData.txt',
+ 'scripts': '/usr/share/unicode/Scripts.txt',
+ 'script-extensions': '/usr/share/unicode/ScriptExtensions.txt',
+ 'blocks': '/usr/share/unicode/Blocks.txt',
+ 'properties': '/usr/share/unicode/PropList.txt',
+ 'derived-core-properties': '/usr/share/unicode/DerivedCoreProperties.txt',
+ 'derived-normalization-properties': '/usr/share/unicode/DerivedNormalizationProps.txt',
+ 'composition-exclusions': '/usr/share/unicode/CompositionExclusions.txt',
+ 'case-folding': '/usr/share/unicode/CaseFolding.txt',
+ 'bidi-mirroring': '/usr/share/unicode/BidiMirroring.txt',
+ 'bidi-brackets': '/usr/share/unicode/BidiBrackets.txt',
+ 'line-break': '/usr/share/unicode/LineBreak.txt',
+ 'word-break': '/usr/share/unicode/auxiliary/WordBreakProperty.txt'
+ }
+];
+
+module.exports = resources;
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..61d8ffa
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+
+UNICODE = /usr/share/unicode
+VERSION = 10.0.0
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ mkdir data
+ ln -s $(UNICODE)/UnicodeData.txt data/$(VERSION)-main.txt
+ ln -s $(UNICODE)/Scripts.txt data/$(VERSION)-scripts.txt
+ ln -s $(UNICODE)/ScriptExtensions.txt data/$(VERSION)-script-extensions.txt
+ ln -s $(UNICODE)/Blocks.txt data/$(VERSION)-blocks.txt
+ ln -s $(UNICODE)/PropList.txt data/$(VERSION)-properties.txt
+ ln -s $(UNICODE)/DerivedCoreProperties.txt data/$(VERSION)-derived-core-properties.txt
+ ln -s $(UNICODE)/DerivedNormalizationProps.txt data/$(VERSION)-derived-normalization-properties.txt
+ ln -s $(UNICODE)/CompositionExclusions.txt data/$(VERSION)-composition-exclusions.txt
+ ln -s $(UNICODE)/CaseFolding.txt data/$(VERSION)-case-folding.txt
+ ln -s $(UNICODE)/BidiMirroring.txt data/$(VERSION)-bidi-mirroring.txt
+ ln -s $(UNICODE)/BidiBrackets.txt data/$(VERSION)-bidi-brackets.txt
+ ln -s $(UNICODE)/auxiliary/WordBreakProperty.txt data/$(VERSION)-word-break.txt
+ node scripts/generate-data.js
+
+override_dh_auto_clean:
+ rm -rf data
+ rm -rf output
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d5aceda
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: require
+Depends: node-unicode-data
diff --git a/debian/tests/require b/debian/tests/require
new file mode 100644
index 0000000..cbe57c2
--- /dev/null
+++ b/debian/tests/require
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+node -e "require('unicode-data');"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-unicode-data.git
More information about the Pkg-javascript-commits
mailing list