[nodejs-sqlite3] Update to 2.1.16 upstream release
Tom Hughes
tomh at fedoraproject.org
Tue Sep 10 18:39:30 UTC 2013
commit 94ca811122ae122c5648670edf12642861c3a324
Author: Tom Hughes <tom at compton.nu>
Date: Tue Sep 10 18:50:56 2013 +0100
Update to 2.1.16 upstream release
.gitignore | 1 +
nodejs-sqlite3-binary.patch | 88 +++++++++++++++++++++++++++++++++++++++++++
nodejs-sqlite3.spec | 14 ++++++-
sources | 2 +-
4 files changed, 102 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 80b345e..e252473 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/sqlite3-2.1.12.tgz
/sqlite3-2.1.14.tgz
/sqlite3-2.1.15.tgz
+/sqlite3-2.1.16.tgz
diff --git a/nodejs-sqlite3-binary.patch b/nodejs-sqlite3-binary.patch
new file mode 100644
index 0000000..f20eb23
--- /dev/null
+++ b/nodejs-sqlite3-binary.patch
@@ -0,0 +1,88 @@
+commit 0878a535ec74ed7bd13e644e9dbc1c9cdef2ce33
+Author: Tom Hughes <tom at compton.nu>
+Date: Tue Sep 10 19:05:43 2013 +0100
+
+ Drop complicated binary loading scheme
+
+diff --git a/lib/binary_name.js b/lib/binary_name.js
+deleted file mode 100644
+index 2ca6b6d..0000000
+--- a/lib/binary_name.js
++++ /dev/null
+@@ -1,57 +0,0 @@
+-
+-var path = require('path');
+-
+-var Binary = function(options) {
+- var options = options || {};
+- var package_json = options.package_json || require('../package.json');
+- this.name = options.name || 'binding';
+- this.configuration = options.configuration || 'Release';
+- this.uri = options.uri || 'http://'+this.name+'.s3.amazonaws.com/';
+- this.module_maj_min = package_json.version.split('.').slice(0,2).join('.');
+- this.module_abi = package_json.abi;
+- this.platform = options.platform || process.platform;
+- this.target_arch = options.target_arch || process.arch;
+- if (process.versions.modules) {
+- this.node_abi = 'node-v' + process.versions.modules
+- } else {
+- this.node_abi = 'v8-' + process.versions.v8.split('.').slice(0,2).join('.');
+- }
+-}
+-
+-Binary.prototype.filename = function() {
+- return this.name + '.node';
+-}
+-
+-Binary.prototype.compression = function() {
+- return '.tar.gz';
+-}
+-
+-Binary.prototype.getBasePath = function() {
+- return this.node_abi
+- + '-' + this.platform
+- + '-' + this.target_arch;
+-}
+-
+-Binary.prototype.getRequirePath = function(configuration) {
+- return './' + path.join('binding',
+- configuration || this.configuration,
+- this.getBasePath(),
+- this.filename());
+-}
+-
+-Binary.prototype.getModuleAbi = function() {
+- return this.name + '-v' + this.module_maj_min + '.' + this.module_abi;
+-}
+-
+-Binary.prototype.getArchivePath = function() {
+- return this.getModuleAbi()
+- + '-'
+- + this.getBasePath()
+- + this.compression();
+-}
+-
+-Binary.prototype.getRemotePath = function() {
+- return this.uri+this.configuration+'/'+this.getArchivePath();
+-}
+-
+-module.exports.Binary = Binary;
+\ No newline at end of file
+diff --git a/lib/sqlite3.js b/lib/sqlite3.js
+index f7506c2..62541cf 100644
+--- a/lib/sqlite3.js
++++ b/lib/sqlite3.js
+@@ -1,12 +1,4 @@
+-var Binary = require('./binary_name.js').Binary;
+-var binary = new Binary({name:'node_sqlite3'});
+-var binding;
+-try {
+- binding = require(binary.getRequirePath('Debug'));
+-} catch (err) {
+- binding = require(binary.getRequirePath('Release'));
+-}
+-var sqlite3 = module.exports = exports = binding;
++var sqlite3 = module.exports = exports = require('./node_sqlite3.node');
+ var path = require('path');
+ var util = require('util');
+ var EventEmitter = require('events').EventEmitter;
diff --git a/nodejs-sqlite3.spec b/nodejs-sqlite3.spec
index c508fd2..0019180 100644
--- a/nodejs-sqlite3.spec
+++ b/nodejs-sqlite3.spec
@@ -1,13 +1,14 @@
%global enable_tests 1
Name: nodejs-sqlite3
-Version: 2.1.15
+Version: 2.1.16
Release: 1%{?dist}
Summary: Asynchronous, non-blocking SQLite3 bindings for Node.js
License: BSD
URL: https://github.com/developmentseed/node-sqlite3
Source0: http://registry.npmjs.org/sqlite3/-/sqlite3-%{version}.tgz
+Patch0: nodejs-sqlite3-binary.patch
ExclusiveArch: %{nodejs_arches}
BuildRequires: nodejs-devel
@@ -27,6 +28,10 @@ BuildRequires: npm(step)
%prep
%setup -q -n package
+%patch0 -p1
+%nodejs_fixdep -r mkdirp
+%nodejs_fixdep -r progress
+%nodejs_fixdep -r tar.gz
rm -rf deps/* node_modules
echo "{}" > deps/common-sqlite.gypi
@@ -40,12 +45,14 @@ node-gyp build
%install
mkdir -p %{buildroot}/%{nodejs_sitearch}/sqlite3
cp -pr package.json lib %{buildroot}/%{nodejs_sitearch}/sqlite3
+cp -pr build/Release/node_sqlite3.node %{buildroot}/%{nodejs_sitearch}/sqlite3/lib
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
+ln -s ../build/Release/node_sqlite3.node lib
%{__nodejs} test/support/createdb.js
mkdir test/tmp
NODE_PATH=lib %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 500000
@@ -53,11 +60,14 @@ NODE_PATH=lib %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 500000
%files
-%doc LICENSE README.md examples
+%doc LICENSE README.md CHANGELOG.md examples
%{nodejs_sitearch}/sqlite3
%changelog
+* Tue Sep 10 2013 Tom Hughes <tom at compton.nu> - 2.1.16-1
+- Update to 2.1.16 upstream release
+
* Thu Aug 8 2013 Tom Hughes <tom at compton.nu> - 2.1.15-1
- Update to 2.1.15 upstream release
diff --git a/sources b/sources
index e8754df..614ef56 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-cb9b96e7aa3c088d4b0ca3b808658240 sqlite3-2.1.15.tgz
+3810af871e096242ddebba008cd74281 sqlite3-2.1.16.tgz
More information about the scm-commits
mailing list