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

Revision 12320, 11.8 KB checked in by tomop, 4 years ago (diff)

updated 18 packages

clamav-0.102.2-1

dhcpcd-8.1.1-1

dovecot-2.3.9.3-1

golang-1.13.5-1

llvm-9.0.1-1

libjpeg-turbo-2.0.4-1

libserf-1.3.9-2

libxml2-2.9.10-2

mariadb-10.4.12-1

nodejs-12.16.0-1

php-ext-clearsilver-0.4-15

php73-7.3.14-1

python-pillow-6.2.2-1

rust-1.40.0-1

spamassassin-3.4.4-1

sqlite3-3.31.1-1

squid-4.10-1

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