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

Revision 10767, 10.4 KB checked in by ara_t, 8 years ago (diff)

rebuild with gcc-5.4.0

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