2 # - fix linking (-lz missing):
3 #i686-pld-linux-g++ Release/src/node_main_4.o Release/src/node_4.o Release/src/node_buffer_4.o Release/src/node_javascript_4.o Release/src/node_extensions_4.o Release/src/node_http_parser_4.o Release/src/node_constants_4.o Release/src/node_file_4.o Release/src/node_script_4.o Release/src/node_os_4.o Release/src/node_dtrace_4.o Release/src/node_string_4.o Release/src/node_zlib_4.o Release/src/timer_wrap_4.o Release/src/handle_wrap_4.o Release/src/stream_wrap_4.o Release/src/tcp_wrap_4.o Release/src/udp_wrap_4.o Release/src/pipe_wrap_4.o Release/src/cares_wrap_4.o Rel/usr/bin/ld: Release/src/node_zlib_4.o: undefined reference to symbol 'inflate'
4 #/usr/bin/ld: note: 'inflate' is defined in DSO /lib/libz.so.1 so try adding it to the linker command line
5 #/lib/libz.so.1: could not read symbols: Invalid operation
6 Summary: Asynchronous JavaScript Engine
10 License: BSD and MIT and ASL 2.0 and GPLv3
11 Group: Development/Languages
12 URL: http://www.nodejs.org/
13 Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
14 # Source0-md5: 852cfb1ed8125a4cdba456446d869d19
15 Patch1: %{name}-soname.patch
16 # force node to use /usr/lib/node as the systemwide module directory
17 Patch2: %{name}-libpath.patch
18 # use /usr/lib64/node as an arch-specific module dir when appropriate
19 Patch3: %{name}-lib64path.patch
20 BuildRequires: c-ares-devel >= 1.7.4
21 BuildRequires: gcc >= 5:4.0
22 BuildRequires: libeio-devel
23 BuildRequires: libev-devel >= 4.0.0
24 BuildRequires: libstdc++-devel
25 BuildRequires: python >= 1:2.5.2
26 BuildRequires: python-jsmin
27 BuildRequires: rpm >= 4.4.9-56
28 BuildRequires: rpmbuild(macros) >= 1.219
29 BuildRequires: v8-devel >= 3.6
30 ExclusiveArch: %{ix86} %{x8664} arm
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Node.js is a platform built on Chrome's JavaScript runtime for easily
35 building fast, scalable network applications. Node.js uses an
36 event-driven, non-blocking I/O model that makes it lightweight and
37 efficient, perfect for data-intensive real-time applications that run
38 across distributed devices.
41 Summary: Development headers for nodejs
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
44 Requires: %{name}-waf = %{version}-%{release}
46 Requires: libstdc++-devel
50 Development headers for nodejs.
53 Summary: Evented I/O for V8 JavaScript - documentation
57 Node.js is a server-side JavaScript environment that uses an
58 asynchronous event-driven model. Node's goal is to provide an easy way
59 to build scalable network programs.
61 This package contains the documentation for nodejs.
64 Summary: Evented I/O for V8 JavaScript - customized WAF build system
66 Requires: %{name} = %{version}-%{release}
69 Node.js is a server-side JavaScript environment that uses an
70 asynchronous event-driven model. Node's goal is to provide an easy way
71 to build scalable network programs.
73 This package contains the customized version of the WAF build system
74 used by Node.js and many of its modules.
77 %setup -q -n node-v%{version}
79 %if %{_lib} == "lib64"
85 # fix #!/usr/bin/env python -> #!/usr/bin/python:
86 grep -rl 'bin/env python' tools | xargs %{__sed} -i -e '1s,^#!.*python,#!%{__python},'
89 CFLAGS="%{rpmcflags} -fPIC"
90 CXXFLAGS="%{rpmcxxflags} -fPIC"
91 LDFLAGS="%{rpmcflags}"
92 %if "%{pld_release}" == "ac"
99 export CFLAGS LDFLAGS CXXFLAGS CC CXX
101 # Error: V8 doesn't like ccache. Please set your CC env var to 'gcc'
104 # NOT autoconf so dont use macro
105 export PYTHONPATH=tools
111 --libdir=%{_libdir} \
118 # relink with shared lib
119 $CC -o out/Release/node src/node_main.cc -Isrc -Ideps/uv/include -lnode -Lout/Release
122 rm -rf $RPM_BUILD_ROOT
124 DESTDIR=$RPM_BUILD_ROOT
126 # for compat of fedora derivered scripts (shebangs)
127 ln -s node $RPM_BUILD_ROOT%{_bindir}/nodejs
129 # globally installed node modules (noarch)
130 install -d $RPM_BUILD_ROOT%{_prefix}/lib/node_modules
132 # default searchpaths
133 install -d $RPM_BUILD_ROOT{%{_libdir},%{_prefix}/lib}/node
136 export PYTHONPATH=tools
137 %{__python} tools/waf-light install \
138 --product-type=cshlib \
139 --destdir=$RPM_BUILD_ROOT
141 chmod a+x $RPM_BUILD_ROOT%{_libdir}/*.so*
144 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
145 cat <<'EOF' > $RPM_BUILD_ROOT%{_pkgconfigdir}/%{name}.pc
148 libdir=${prefix}/%{_lib}
149 includedir=${prefix}/include/node
152 Description: Evented I/O for V8 JavaScript.
154 Cflags: -I${includedir}
157 %py_ocomp $RPM_BUILD_ROOT%{_libdir}/node/wafadmin
158 %py_comp $RPM_BUILD_ROOT%{_libdir}/node/wafadmin
159 # TODO: check it first
160 #%%py_postclean %{_libdir}/node/wafadmin
162 # install documentation
163 install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
164 cp -a doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/html
165 cd $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
167 mv html/api/*.markdown api
168 mv html/api/api/* html/api
173 rm -rf $RPM_BUILD_ROOT
175 %post -p /sbin/ldconfig
176 %postun -p /sbin/ldconfig
179 %defattr(644,root,root,755)
180 %doc README.md AUTHORS ChangeLog LICENSE
181 %attr(755,root,root) %{_bindir}/node
182 %attr(755,root,root) %{_bindir}/nodejs
183 %attr(755,root,root) %{_libdir}/libnode.so.*.*.*
184 %ghost %{_libdir}/libnode.so.6
186 %dir %{_prefix}/lib/node
187 %dir %{_prefix}/lib/node_modules
188 %{_mandir}/man1/node.1*
191 %defattr(644,root,root,755)
192 %{_libdir}/libnode.so
194 %{_pkgconfigdir}/nodejs.pc
197 %defattr(644,root,root,755)
198 %doc %{_docdir}/%{name}-doc-%{version}
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_bindir}/node-waf
203 %dir %{_libdir}/node/wafadmin
204 %dir %{_libdir}/node/wafadmin/Tools
205 %{_libdir}/node/wafadmin/*.py[co]
206 %{_libdir}/node/wafadmin/*.py
207 %{_libdir}/node/wafadmin/Tools/*.py
208 %{_libdir}/node/wafadmin/Tools/*.py[co]