1 Summary: Asynchronous JavaScript Engine
7 URL: http://www.nodejs.org/
8 Source0: http://www.nodejs.org/dist/node-v%{version}.tar.gz
9 # Source0-md5: 9fd7baa2d27b848c3134e6ae35bb87b2
10 Patch1: %{name}-soname.patch
11 # force node to use /usr/lib/node as the systemwide module directory
12 Patch2: %{name}-libpath.patch
13 # use /usr/lib64/node as an arch-specific module dir when appropriate
14 Patch3: %{name}-lib64path.patch
15 BuildRequires: c-ares-devel >= 1.7.4
16 BuildRequires: gcc >= 5:4.0
17 BuildRequires: libeio-devel
18 BuildRequires: libev-devel >= 4.0.0
19 BuildRequires: libstdc++-devel
20 BuildRequires: python >= 1:2.5.2
21 BuildRequires: python-jsmin
22 BuildRequires: rpm >= 4.4.9-56
23 BuildRequires: v8-devel >= 3.6
24 ExclusiveArch: %{ix86} %{x8664} arm
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Node.js is a platform built on Chrome's JavaScript runtime for easily
29 building fast, scalable network applications. Node.js uses an
30 event-driven, non-blocking I/O model that makes it lightweight and
31 efficient, perfect for data-intensive real-time applications that run
32 across distributed devices.
35 Summary: Development headers for nodejs
36 Group: Development/Libraries
37 Requires: %{name} = %{version}-%{release}
40 Development headers for nodejs.
43 Summary: Evented I/O for V8 JavaScript - documentation
47 Node.js is a server-side JavaScript environment that uses an
48 asynchronous event-driven model. Node's goal is to provide an easy way
49 to build scalable network programs.
51 This package contains the documentation for nodejs.
54 Summary: Evented I/O for V8 JavaScript - customized WAF build system
56 Requires: %{name} = %{version}-%{release}
59 Node.js is a server-side JavaScript environment that uses an
60 asynchronous event-driven model. Node's goal is to provide an easy way
61 to build scalable network programs.
63 This package contains the customized version of the WAF build system
64 used by Node.js and many of its modules.
67 %setup -q -n node-v%{version}
69 %if %{_lib} == "lib64"
78 CFLAGS="%{rpmcflags} -fPIC"
79 CXXFLAGS="%{rpmcxxflags} -fPIC"
80 LDFLAGS="%{rpmcflags}"
81 %if "%{pld_release}" == "ac"
88 export CFLAGS LDFLAGS CXXFLAGS CC CXX
90 # NOT autoconf so dont use macro
91 export PYTHONPATH=tools
102 # relink with shared lib
103 $CC -o out/Release/node src/node_main.cc -Isrc -Ideps/uv/include -lnode -Lout/Release
106 rm -rf $RPM_BUILD_ROOT
108 DESTDIR=$RPM_BUILD_ROOT
110 ln -s node $RPM_BUILD_ROOT%{_bindir}/nodejs
113 export PYTHONPATH=tools
114 %{__python} tools/waf-light install \
115 --product-type=cshlib \
116 --destdir=$RPM_BUILD_ROOT
118 chmod a+x $RPM_BUILD_ROOT%{_libdir}/*.so*
121 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
122 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
125 libdir=${prefix}/%{_lib}
126 includedir=${prefix}/include/node
129 Description: Evented I/O for V8 JavaScript.
131 Cflags: -I${includedir}
134 # install documentation
135 install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
136 cp -a doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
137 cd $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
139 mv html/api/*.markdown api
140 mv html/api/api/* html/api
144 # remove NPM; it's buggy in 0.6.3
145 # but really we package npm from separate spec
146 rm -rf $RPM_BUILD_ROOT%{_libdir}/node_modules
147 rm $RPM_BUILD_ROOT%{_bindir}/npm
150 rm -rf $RPM_BUILD_ROOT
152 %post -p /sbin/ldconfig
153 %postun -p /sbin/ldconfig
156 %defattr(644,root,root,755)
157 %doc README.md AUTHORS ChangeLog LICENSE
158 %attr(755,root,root) %{_bindir}/node
159 %attr(755,root,root) %{_bindir}/nodejs
160 %attr(755,root,root) %{_libdir}/libnode.so.*.*.*
161 %ghost %{_libdir}/libnode.so.4
163 %{_mandir}/man1/node.1*
166 %defattr(644,root,root,755)
167 %{_libdir}/libnode.so
169 %{_pkgconfigdir}/nodejs.pc
172 %defattr(644,root,root,755)
173 %doc %{_docdir}/%{name}-doc-%{version}
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/node-waf
178 %dir %{_libdir}/node/wafadmin
179 %dir %{_libdir}/node/wafadmin/Tools
180 %{_libdir}/node/wafadmin/*.py
181 %{_libdir}/node/wafadmin/Tools/*.py