[nodejs/el6] write native module Requires from nodejs.req

T.C. Hollingsworth patches at fedoraproject.org
Mon Apr 15 03:33:09 UTC 2013


commit a818ef9e9600af0b55cc3fefd50f476970b26e0d
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Sun Apr 14 19:22:50 2013 -0700

    write native module Requires from nodejs.req

 nodejs.req  |    5 +++++
 nodejs.spec |    7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/nodejs.req b/nodejs.req
index 96570f8..b1f3f90 100755
--- a/nodejs.req
+++ b/nodejs.req
@@ -61,6 +61,11 @@ def main():
                 for name, version in metadata['dependencies'].iteritems():
                     req = 'npm(' + name + ')'
                     deps += process_dep(req, version)
+	elif path.endswith('.node'):
+	    #this is a native module so output the necessary requires
+	    fh = open('/usr/lib/rpm/nodejs_native.req')
+	    print fh.read()
+	    fh.close()
 
     print '\n'.join(deps)
     
diff --git a/nodejs.spec b/nodejs.spec
index 087784d..65e4b21 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -149,11 +149,9 @@ install -pm0755 %{SOURCE6} %{buildroot}%{_rpmconfigdir}/nodejs-fixdep
 # ensure Requires are added to every native module that match the Provides from
 # the nodejs build in the buildroot
 cat << EOF > %{buildroot}%{_rpmconfigdir}/nodejs_native.req
-#!/bin/sh
-echo 'nodejs(abi) = %nodejs_abi'
-echo 'nodejs(v8-abi) = %v8_abi'
+nodejs(abi) = %nodejs_abi
+nodejs(v8-abi) = %v8_abi
 EOF
-chmod 0755 %{buildroot}%{_rpmconfigdir}/nodejs_native.req
 
 #install documentation
 mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-docs-%{version}/html
@@ -195,6 +193,7 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
 - port nodejs_default_filter to EL6
 - add nodejs_find_provides_and_requires macro to invoke dependency generator
 - invoke the standard RPM provides and requires generators from the Node.js ones
+- write native module Requires from nodejs.req
 
 * Tue Apr 09 2013 Stephen Gallagher <sgallagh at redhat.com> - 0.10.3-2.1
 - Build against c-ares 1.9


More information about the scm-commits mailing list