source: projects/specs/trunk/n/nodejs/nodejs-vl.spec @ 8318

Revision 8318, 10.3 KB checked in by daisuke, 10 years ago (diff)

nodejs: update to 0.10.26

Line 
1%global system_zlib 1
2%global system_v8 1
3%global system_openssl 1
4%global system_http_parser 0
5%global system_cares 0
6%global system_libuv 0
7
8%if "%{_dist_release}" < "vl7"
9%global system_openssl 0
10%endif
11
12Name: nodejs
13Version: 0.10.26
14Release: 1%{?_dist_release}
15Summary: JavaScript runtime
16Summary(ja): JavaScript runtime
17License: MIT and ASL 2.0 and ISC and BSD
18Group: Development/Languages
19URL: http://nodejs.org/
20
21# Exclusive archs must match v8
22ExclusiveArch: %{ix86} x86_64 %{arm}
23
24Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
25Source1: macros.nodejs
26Source2: nodejs.attr
27Source3: nodejs.prov
28Source4: nodejs.req
29Source5: nodejs-symlink-deps
30Source6: nodejs-fixdep
31
32# V8 presently breaks ABI at least every x.y release while never bumping SONAME,
33# so we need to be more explicit until spot fixes that
34%global v8_ge 3.13.7.5
35%global v8_lt 3.14
36
37%if %{system_v8}
38BuildRequires: v8-devel >= %{v8_ge}
39%endif
40%if %{system_http_parser}
41BuildRequires: http-parser-devel >= 2.0
42%endif
43%if %{system_libuv}
44BuildRequires: libuv-devel
45%endif
46%if %{system_cares}
47BuildRequires: c-ares-devel
48%endif
49%if %{system_zlib}
50BuildRequires: zlib-devel
51%endif
52
53%if %{system_openssl}
54# Node.js requires some features from openssl 1.0.1 for SPDY support
55BuildRequires: openssl-devel >= 1.0.1
56%endif
57
58%if %{system_v8}
59Requires: v8%{?isa} >= %{v8_ge}
60Requires: v8%{?isa} < %{v8_lt}
61%endif
62
63#virtual provides for automatic depedency generation
64Provides: nodejs(engine) = %{version}
65
66#npm
67Provides: npm = %{version}-%{release}
68
69# Node.js currently has a conflict with the 'node' package in Fedora
70# The ham-radio group has agreed to rename their binary for us, but
71# in the meantime, we're setting an explicit Conflicts: here
72Conflicts: node <= 0.3.2-11
73
74%description
75Node.js is a platform built on Chrome's JavaScript runtime
76for easily building fast, scalable network applications.
77Node.js uses an event-driven, non-blocking I/O model that
78makes it lightweight and efficient, perfect for data-intensive
79real-time applications that run across distributed devices.
80
81%package devel
82Summary: JavaScript runtime - development headers
83Summary(ja): JavaScript runtime - development headers
84Group: Development/Languages
85Requires: %{name} == %{version}-%{release}
86%if %{system_libuv}
87Requires: libuv-devel
88%endif
89%if %{system_http_parser}
90Requires: http-parser-devel
91%endif
92%if %{system_cares}
93Requires: c-ares-devel
94%endif
95%if %{system_zlib}
96Requires: zlib-devel
97%endif
98%if %{system_openssl}
99Requires: openssl-devel
100%endif
101
102%description devel
103Development headers for the Node.js JavaScript runtime.
104
105%package docs
106Summary: Node.js API documentation
107Summary(ja): Node.js API documentation
108Group: Documentation
109
110%description docs
111The API documentation for the Node.js JavaScript runtime.
112
113%prep
114%setup -q -n node-v%{version}
115
116# Make sure nothing gets included from bundled deps:
117# We only delete the source and header files, because
118# the remaining build scripts are still used.
119
120%if %{system_cares}
121find deps/cares -name "*.c" -exec rm -f {} \;
122find deps/cares -name "*.h" -exec rm -f {} \;
123%endif
124
125%if %{system_zlib}
126find deps/zlib -name "*.c" -exec rm -f {} \;
127find deps/zlib -name "*.h" -exec rm -f {} \;
128%endif
129
130%if %{system_v8}
131find deps/v8 -name "*.c" -exec rm -f {} \;
132find deps/v8 -name "*.h" -exec rm -f {} \;
133%endif
134
135%if %{system_http_parser}
136find deps/http_parser -name "*.c" -exec rm -f {} \;
137find deps/http_parser -name "*.h" -exec rm -f {} \;
138%endif
139
140%if %{system_openssl}
141find deps/openssl -name "*.c" -exec rm -f {} \;
142find deps/openssl -name "*.h" -exec rm -f {} \;
143%endif
144
145%if %{system_libuv}
146find deps/uv -name "*.c" -exec rm -f {} \;
147find deps/uv -name "*.h" -exec rm -f {} \;
148%endif
149
150%build
151# build with debugging symbols and add defines from libuv (#892601)
152export CFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
153export CXXFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
154
155./configure --prefix=%{_prefix} \
156          %if %{system_v8}
157            --shared-v8 \
158          %endif
159          %if %{system_openssl}
160            --shared-openssl \
161          %endif
162          %if %{system_zlib}
163            --shared-zlib \
164          %endif
165          %if %{system_cares}
166            --shared-cares \
167          %endif
168          %if %{system_libuv}
169            --shared-libuv \
170          %endif
171          %if %{system_http_parser}
172            --shared-http-parser \
173          %endif
174            --without-dtrace
175
176# Setting BUILDTYPE=Debug builds both release and debug binaries
177make BUILDTYPE=Debug %{?_smp_mflags}
178
179%install
180rm -rf %{buildroot}
181
182./tools/install.py install %{buildroot}
183
184# and remove dtrace file again
185rm -rf %{buildroot}/%{_prefix}/lib/dtrace
186
187# Set the binary permissions properly
188chmod 0755 %{buildroot}/%{_bindir}/node
189
190# Install the debug binary and set its permissions
191install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g
192
193# own the sitelib directory
194mkdir -p %{buildroot}%{_prefix}/lib/node_modules
195
196# install rpm magic
197install -Dpm0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.nodejs
198install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs.attr
199install -pm0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/nodejs.prov
200install -pm0755 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/nodejs.req
201install -pm0755 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/nodejs-symlink-deps
202install -pm0755 %{SOURCE6} %{buildroot}%{_rpmconfigdir}/nodejs-fixdep
203
204#install documentation
205mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-docs-%{version}/html
206cp -pr doc/* %{buildroot}%{_defaultdocdir}/%{name}-docs-%{version}/html
207rm -f %{_defaultdocdir}/%{name}-docs-%{version}/html/nodejs.1
208
209#install development headers
210#FIXME: we probably don't really need *.h but node-gyp downloads the whole
211#freaking source tree so I can't be sure ATM
212mkdir -p %{buildroot}%{_includedir}/node
213cp -p src/*.h %{buildroot}%{_includedir}/node
214
215#node-gyp needs common.gypi too
216mkdir -p %{buildroot}%{_datadir}/node
217cp -p common.gypi %{buildroot}%{_datadir}/node
218
219%files
220%doc ChangeLog LICENSE README.md AUTHORS
221%{_bindir}/node
222%{_bindir}/npm
223%{_mandir}/man1/node.*
224%dir %{_prefix}/lib/node_modules
225%{_prefix}/lib/node_modules/npm
226
227%files devel
228%{_bindir}/node_g
229%{_includedir}/node
230%{_datadir}/node
231%{_sysconfdir}/rpm/macros.nodejs
232%{_rpmconfigdir}/fileattrs/nodejs.attr
233%{_rpmconfigdir}/nodejs*
234
235%files docs
236#%{_defaultdocdir}/%{name}-docs-%{version}
237%doc LICENSE
238
239%changelog
240* Mon Mar 24 2014 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.26-1
241- update to 0.10.26
242
243* Thu May 02 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.5-1
244- update to 0.10.5
245- fix deps
246
247* Fri Mar 15 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.0-2
248- build with internal openssl on Vine Linux 6
249
250* Wed Mar 13 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.0-1
251- update to 0.10.0
252
253* Mon Mar 11 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1
254- initial build for Vine Linux
255- include npm
256
257* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-11
258- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
259
260* Tue Jan 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-10
261- minor bugfixes to RPM magic
262  - nodejs-symlink-deps: don't create an empty node_modules dir when a module
263    has no dependencies
264  - nodes-fixdep: support adding deps when none exist
265- Add the full set of headers usually bundled with node as deps to nodejs-devel.
266  This way `npm install` for native modules that assume the stuff bundled with
267  node exists will usually "just work".
268-move RPM magic to nodejs-devel as requested by FPC
269
270* Sat Jan 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-9
271- fix brown paper bag bug in requires generation script
272
273* Thu Jan 10 2013 Stephen Gallagher <sgallagh@redhat.com> - 0.9.5-8
274- Build debug binary and install it in the nodejs-devel subpackage
275
276* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-7
277- don't use make install since it rebuilds everything
278
279* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-6
280- add %%{?isa}, epoch to v8 deps
281
282* Wed Jan 09 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-5
283- add defines to match libuv (#892601)
284- make v8 dependency explicit (and thus more accurate)
285- add -g to $C(XX)FLAGS instead of patching configure to add it
286- don't write pointless 'npm(foo) > 0' deps
287
288* Sat Jan 05 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-4
289- install development headers
290- add nodejs_sitearch macro
291
292* Wed Jan 02 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-3
293- make nodejs-symlink-deps actually work
294
295* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-2
296- provide nodejs-devel so modules can BuildRequire it (and be consistent
297  with other interpreted languages in the distro)
298
299* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-1
300- new upstream release 0.9.5
301- provide nodejs-devel for the moment
302- fix minor bugs in RPM magic
303- add nodejs_fixdep macro so packagers can easily adjust dependencies in
304  package.json files
305
306* Wed Dec 26 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.4-1
307- new upstream release 0.9.4
308- system library patches are now upstream
309- respect optflags
310- include documentation in subpackage
311- add RPM dependency generation and related magic
312- guard libuv depedency so it always gets bumped when nodejs does
313- add -devel subpackage with enough to make node-gyp happy
314
315* Wed Dec 19 2012 Dan Horák <dan[at]danny.cz> - 0.9.3-8
316- set exclusive arch list to match v8
317
318* Tue Dec 18 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-7
319- Add remaining changes from code review
320- Remove unnecessary BuildRequires on findutils
321- Remove %%clean section
322
323* Fri Dec 14 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-6
324- Fixes from code review
325- Fix executable permissions
326- Correct the License field
327- Build debuginfo properly
328
329* Thu Dec 13 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-5
330- Return back to using the standard binary name
331- Temporarily adding a conflict against the ham radio node package until they
332  complete an agreed rename of their binary.
333
334* Wed Nov 28 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-4
335- Rename binary and manpage to nodejs
336
337* Mon Nov 19 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-3
338- Update to latest upstream development release 0.9.3
339- Include upstreamed patches to unbundle dependent libraries
340
341* Tue Oct 23 2012 Adrian Alves <alvesadrian@fedoraproject.org>  0.8.12-1
342- Fixes and Patches suggested by Matthias Runge
343
344* Mon Apr 09 2012 Adrian Alves <alvesadrian@fedoraproject.org> 0.6.5
345- First build.
346
Note: See TracBrowser for help on using the repository browser.