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

Revision 12520, 12.3 KB checked in by tomop, 3 years ago (diff)

updated 5 packages

dovecot-2.3.13-1

nodejs-14.15.4-1

php74-7.4.14-1

postfix-3.5.9-1

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