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

Revision 12429, 12.0 KB checked in by tomop, 4 years ago (diff)

updated 3 packages

clamav-0.102.4-1

firefox-78.0.2-1

nodejs-12.18.2-1

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