[packages/nodejs-microtime] up to 0.3.3

glen glen at pld-linux.org
Sun Apr 7 19:37:17 CEST 2013


commit 8be661cc76348020df5a48d38b0f8b29fa3cfa5e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Apr 7 20:36:46 2013 +0300

    up to 0.3.3

 library-path.patch    | 12 ------------
 nodejs-microtime.spec | 27 ++++++++++-----------------
 2 files changed, 10 insertions(+), 29 deletions(-)
---
diff --git a/nodejs-microtime.spec b/nodejs-microtime.spec
index 967b0be..45cedb4 100644
--- a/nodejs-microtime.spec
+++ b/nodejs-microtime.spec
@@ -1,18 +1,20 @@
 %define		pkg	microtime
 Summary:	Get the current time in microseconds
 Name:		nodejs-%{pkg}
-Version:	0.2.0
-Release:	3
+Version:	0.3.3
+Release:	1
 License:	MIT
 Group:		Development/Libraries
 URL:		https://github.com/wadey/node-microtime
 Source0:	http://registry.npmjs.org/microtime/-/%{pkg}-%{version}.tgz
-# Source0-md5:	9bc25aebc64b0c7370727013098dd6c3
-Patch0:		library-path.patch
-BuildRequires:	nodejs-devel
+# Source0-md5:	0235c2c7e670706dd9ad0d05c773706e
+BuildRequires:	nodejs-devel >= 0.8
 BuildRequires:	rpmbuild(macros) >= 1.634
+BuildRequires:	npm >= 1.1.5
+BuildRequires:	nodejs-gyp
 BuildRequires:	sed >= 4.0
-Requires:	nodejs
+Requires:	nodejs >= 0.6
+Requires:	nodejs-bindings >= 1.0.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # redefine for arch specific
@@ -30,24 +32,15 @@ continuously or in `ticks'.
 %prep
 %setup -qc
 mv package/* .
-%patch0 -p1
-
-# make it noop for npm link
-%{__sed} -i -e 's,node-waf configure build,/bin/true,' package.json
 
 %build
-NODE_PATH=%{nodejs_libdir}/%{pkg} \
-node-waf configure build
+node-gyp configure build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
 cp -pr index.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
-
-node-waf install \
-	--destdir=$RPM_BUILD_ROOT
-
-chmod a+x $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}/microtime.node
+install -p build/Release/microtime.node $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
diff --git a/library-path.patch b/library-path.patch
deleted file mode 100644
index 5c7e36e..0000000
--- a/library-path.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- nodejs-microtime-0.2.0/index.js~	2011-11-07 20:47:19.000000000 +0200
-+++ nodejs-microtime-0.2.0/index.js	2012-06-17 18:24:15.300783077 +0300
-@@ -5,8 +5,7 @@
- // `node at 0.4.x` and `node at 0.6.x`.
- // (from https://github.com/indexzero/daemon.node)
- //
--try { binding = require('./build/default/microtime') }
--catch (ex) { binding = require('./build/Release/microtime') }
-+binding = require('./microtime')
- 
- exports.now = binding.now
- exports.nowDouble = binding.nowDouble
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nodejs-microtime.git/commitdiff/8be661cc76348020df5a48d38b0f8b29fa3cfa5e



More information about the pld-cvs-commit mailing list