[nodejs-sqlite3] Update to 2.2.2 upstream release

Tom Hughes tomh at fedoraproject.org
Mon Apr 14 10:14:23 UTC 2014


commit fab14a04e4b773eaad0eebd9fa3a9050ab5f9b5f
Author: Tom Hughes <tom at compton.nu>
Date:   Mon Apr 14 10:45:25 2014 +0100

    Update to 2.2.2 upstream release

 .gitignore                  |    1 +
 nodejs-sqlite3-pregyp.patch |   33 +++++++++++++++++++++++++++++++++
 nodejs-sqlite3-rpath.patch  |   10 +++++-----
 nodejs-sqlite3.spec         |   22 ++++++++++++++--------
 sources                     |    2 +-
 5 files changed, 54 insertions(+), 14 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 6c5abc8..c120f36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@
 /sqlite3-2.1.18.tgz
 /sqlite3-2.1.19.tgz
 /sqlite3-2.2.0.tgz
+/node-sqlite3-75ddb77984ce1639b5520d07aa608c17f2d1552a.tar.gz
diff --git a/nodejs-sqlite3-pregyp.patch b/nodejs-sqlite3-pregyp.patch
new file mode 100644
index 0000000..15b89cb
--- /dev/null
+++ b/nodejs-sqlite3-pregyp.patch
@@ -0,0 +1,33 @@
+commit 5e170d98aa8df2139aa97d3970cd7ee88f82c181
+Author: Tom Hughes <tom at compton.nu>
+Date:   Mon Apr 14 10:57:00 2014 +0100
+
+    Patch out use of node-pre-gyp
+
+diff --git a/lib/sqlite3.js b/lib/sqlite3.js
+index 6332584..b08c5d9 100644
+--- a/lib/sqlite3.js
++++ b/lib/sqlite3.js
+@@ -1,7 +1,6 @@
+ var path = require('path');
+-var binary = require('node-pre-gyp');
+ var path = require('path')
+-var binding_path = binary.find(path.resolve(path.join(__dirname,'../package.json')));
++var binding_path = path.resolve(path.join(__dirname,'binding/node_sqlite3.node'));
+ var binding = require(binding_path);
+ var sqlite3 = module.exports = exports = binding;
+ var util = require('util');
+diff --git a/package.json b/package.json
+index 70f8c5d..f8850b5 100644
+--- a/package.json
++++ b/package.json
+@@ -35,9 +35,6 @@
+         "type": "git",
+         "url": "git://github.com/mapbox/node-sqlite3.git"
+     },
+-    "dependencies": {
+-        "node-pre-gyp": "0.5.x"
+-    },
+     "bundledDependencies": [
+         "node-pre-gyp"
+     ],
diff --git a/nodejs-sqlite3-rpath.patch b/nodejs-sqlite3-rpath.patch
index b1956e8..9cfcf07 100644
--- a/nodejs-sqlite3-rpath.patch
+++ b/nodejs-sqlite3-rpath.patch
@@ -1,16 +1,16 @@
-commit 6ad2e8a5b9a924140d4ee8b6eb733d9c66195f78
+commit 1030f5dc01b55f018c462656d3446357b0962988
 Author: Tom Hughes <tom at compton.nu>
-Date:   Tue Jan 14 19:21:02 2014 +0000
+Date:   Mon Apr 14 10:49:31 2014 +0100
 
     Don't set rpath
 
 diff --git a/binding.gyp b/binding.gyp
-index 6d5babb..273f6a5 100644
+index ca97c77..b0819cf 100644
 --- a/binding.gyp
 +++ b/binding.gyp
-@@ -14,8 +14,7 @@
+@@ -13,8 +13,7 @@
                 "-L<@(sqlite)/lib",
-                "-lsqlite3"
+                "-l<(sqlite_libname)"
              ],
 -            "include_dirs": [ "<@(sqlite)/include" ],
 -            "conditions": [ [ "OS=='linux'", {"libraries+":["-Wl,-rpath=<@(sqlite)/lib"]} ] ]
diff --git a/nodejs-sqlite3.spec b/nodejs-sqlite3.spec
index 99a1075..a28655d 100644
--- a/nodejs-sqlite3.spec
+++ b/nodejs-sqlite3.spec
@@ -1,12 +1,15 @@
+%global commit 75ddb77984ce1639b5520d07aa608c17f2d1552a
+
 Name:           nodejs-sqlite3
-Version:        2.2.0
-Release:        3%{?dist}
+Version:        2.2.2
+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-rpath.patch
+Source0:        https://github.com/developmentseed/node-sqlite3/archive/%{commit}/node-sqlite3-%{commit}.tar.gz
+Patch0:         nodejs-sqlite3-pregyp.patch  
+Patch1:         nodejs-sqlite3-rpath.patch
 ExclusiveArch:  %{nodejs_arches}
 
 BuildRequires:  nodejs-devel
@@ -23,17 +26,16 @@ BuildRequires:  npm(step)
 
 
 %prep
-%setup -q -n package
+%setup -q -n node-sqlite3-%{commit}
 %patch0 -p1
-%nodejs_fixdep -r node-pre-gyp
-rm lib/binary_name.js
+%patch1 -p1
 rm -rf deps/* node_modules
 echo "{}" > deps/common-sqlite.gypi
 
 
 %build
 export CXXFLAGS="%{optflags}"
-node-gyp configure -- -Dsqlite=/usr
+node-gyp configure -- -Dsqlite=/usr -Dmodule_name=node_sqlite3 -Dmodule_path=lib/binding
 node-gyp build
 
 
@@ -56,6 +58,10 @@ NODE_PATH=lib %{nodejs_sitelib}/mocha/bin/mocha -R spec -t 500000
 
 
 %changelog
+* Mon Apr 14 2014 Tom Hughes <tom at compton.nu> - 2.2.2-1
+- Update to 2.2.2 upstream release
+- Switch to source from github as npm no longer includes tests
+
 * Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth at gmail.com> - 2.2.0-3
 - rebuild for icu-53 (via v8)
 
diff --git a/sources b/sources
index c897efd..7672c17 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-737b90895e1e314a2c013ca47304058f  sqlite3-2.2.0.tgz
+d83da39ed5d02e0c8b737acb52b8d220  node-sqlite3-75ddb77984ce1639b5520d07aa608c17f2d1552a.tar.gz


More information about the scm-commits mailing list