From e85103e09321eb5737f8c8375f92eb2cbdef89b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 26 Jan 2012 15:11:58 +0000 Subject: [PATCH] - add node_modules to library search paths - gcc and g++ deps for waf package - new soname Changed files: nodejs-lib64path.patch -> 1.3 nodejs-libpath.patch -> 1.2 nodejs.spec -> 1.28 --- nodejs-lib64path.patch | 2 +- nodejs-libpath.patch | 2 +- nodejs.spec | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/nodejs-lib64path.patch b/nodejs-lib64path.patch index e507f89..7d309db 100644 --- a/nodejs-lib64path.patch +++ b/nodejs-lib64path.patch @@ -5,7 +5,7 @@ Module._initPaths = function() { - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; -+ var paths = ["/usr/lib64/node", "/usr/lib/node"]; ++ var paths = ["/usr/lib64/node", "/usr/lib/node", "/usr/lib/node_modules"]; if (process.env['HOME']) { paths.unshift(path.resolve(process.env['HOME'], '.node_libraries')); diff --git a/nodejs-libpath.patch b/nodejs-libpath.patch index 81cf518..64e2df5 100644 --- a/nodejs-libpath.patch +++ b/nodejs-libpath.patch @@ -5,7 +5,7 @@ Module._initPaths = function() { - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; -+ var paths = ["/usr/lib/node"]; ++ var paths = ["/usr/lib/node", "/usr/lib/node_modules"]; if (process.env['HOME']) { paths.unshift(path.resolve(process.env['HOME'], '.node_libraries')); diff --git a/nodejs.spec b/nodejs.spec index 90d23b8..f8e22b9 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -1,9 +1,9 @@ Summary: Asynchronous JavaScript Engine Name: nodejs Version: 0.6.8 -Release: 1 -License: BSD -Group: Libraries +Release: 2 +License: BSD and MIT and ASL 2.0 and GPLv3 +Group: Development/Languages URL: http://www.nodejs.org/ Source0: http://www.nodejs.org/dist/node-v%{version}.tar.gz # Source0-md5: 9fd7baa2d27b848c3134e6ae35bb87b2 @@ -54,6 +54,9 @@ This package contains the documentation for nodejs. Summary: Evented I/O for V8 JavaScript - customized WAF build system Group: Libraries Requires: %{name} = %{version}-%{release} +Requires: %{name}-devel +Requires: gcc +Requires: libstdc++-devel %description waf Node.js is a server-side JavaScript environment that uses an @@ -107,8 +110,15 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +# for compat of fedora derivered scripts (shebangs) ln -s node $RPM_BUILD_ROOT%{_bindir}/nodejs +# globally installed node modules (noarch) +install -d $RPM_BUILD_ROOT%{_prefix}/lib/node_modules + +# default searchpaths +install -d $RPM_BUILD_ROOT{%{_libdir},%{_prefix}/lib}/node + # install shared lib export PYTHONPATH=tools %{__python} tools/waf-light install \ @@ -158,8 +168,10 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/node %attr(755,root,root) %{_bindir}/nodejs %attr(755,root,root) %{_libdir}/libnode.so.*.*.* -%ghost %{_libdir}/libnode.so.4 +%ghost %{_libdir}/libnode.so.6 %dir %{_libdir}/node +%dir %{_prefix}/lib/node +%dir %{_prefix}/lib/node_modules %{_mandir}/man1/node.1* %files devel -- 2.44.0