/[packages]/updates/8/nodejs/current/SPECS/nodejs.spec
ViewVC logotype

Annotation of /updates/8/nodejs/current/SPECS/nodejs.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1429587 - (hide annotations) (download)
Sat Aug 17 11:47:33 2019 UTC (4 years, 7 months ago) by kekepower
Original Path: cauldron/nodejs/current/SPECS/nodejs.spec
File size: 19093 byte(s)
SILENT: Bump Mageia version to 8

1 kekepower 1394313 # This package is synced with Fedora.
2 joequant 912183
3 joequant 1394644 # This package is tricky since it requires a working nodejs to build nodejs
4     # This causes problems if a broken nodejs gets into the repo
5    
6     # To build it from bootstrap
7     # build a version with bootstrap. Change nodejs-tarball.sh to not strip out
8     # the bundled libraries
9     #
10     # Once you have a working bootstrapped version, turn off bootstrap and
11     # build with a nodejs-tarball.sh that strips out the bundled directories
12    
13 kekepower 1394313 # bundle dependencies that are not available as Mageia modules
14     # %%{!?_with_bootstrap: %%global bootstrap 1}
15     # use bcond for building modules
16 joequant 1394741 %bcond_with bootstrap
17 neoclust 1131239
18     %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
19    
20 neoclust 1015662 # == Node.js Version ==
21     # Note: Mageia should only ship LTS versions of Node.js (currently expected
22 neoclust 1131239 # to be major versions with even numbers). The odd-numbered versions are new
23 neoclust 1015662 # feature releases that are only supported for nine months, which is shorter
24     # than a Mageia release lifecycle.
25 neoclust 1131239 %global nodejs_epoch 1
26 joequant 1256930 %global nodejs_major 10
27 kekepower 1419759 %global nodejs_minor 16
28 kekepower 1429432 %global nodejs_patch 3
29 neoclust 1015662 %global nodejs_abi %{nodejs_major}.%{nodejs_minor}
30 kekepower 1394313 %global nodejs_soversion 64
31 neoclust 1015662 %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}
32 kekepower 1429432 %global nodejs_release 1
33 dams 406472
34 neoclust 1015662 # == Bundled Dependency Versions ==
35     # v8 - from deps/v8/include/v8-version.h
36 kekepower 1394313 # Epoch is set to ensure clean upgrades from the old v8 package
37     %global v8_epoch 1
38 neoclust 1142549 %global v8_major 6
39 joequant 1256930 %global v8_minor 8
40     %global v8_build 275
41 joequant 1329304 %global v8_patch 32
42 neoclust 1015662 # V8 presently breaks ABI at least every x.y release while never bumping SONAME
43     %global v8_abi %{v8_major}.%{v8_minor}
44     %global v8_version %{v8_major}.%{v8_minor}.%{v8_build}.%{v8_patch}
45    
46     # c-ares - from deps/cares/include/ares_version.h
47 neoclust 1142549 # https://github.com/nodejs/node/pull/9332
48 neoclust 1015662 %global c_ares_major 1
49 kekepower 1348619 %global c_ares_minor 15
50 joequant 1256930 %global c_ares_patch 0
51 neoclust 1015662 %global c_ares_version %{c_ares_major}.%{c_ares_minor}.%{c_ares_patch}
52    
53     # http-parser - from deps/http_parser/http_parser.h
54     %global http_parser_major 2
55 kekepower 1223856 %global http_parser_minor 8
56 luigiwalser 1050787 %global http_parser_patch 0
57 neoclust 1015662 %global http_parser_version %{http_parser_major}.%{http_parser_minor}.%{http_parser_patch}
58    
59 kekepower 1394313 # libuv - from deps/uv/include/uv/version.h
60     %global libuv_major 1
61 kekepower 1419759 %global libuv_minor 28
62     %global libuv_patch 0
63 kekepower 1394313 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch}
64    
65     # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
66     %global nghttp2_major 1
67     %global nghttp2_minor 34
68     %global nghttp2_patch 0
69     %global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch}
70    
71     # ICU - from tools/icu/current_ver.dep
72 kekepower 1429432 %global icu_major 64
73     %global icu_minor 2
74 kekepower 1394313 %global icu_version %{icu_major}.%{icu_minor}
75    
76 kekepower 1429587 %if 0%{?mageia} >= 8
77 kekepower 1394313 %global icu_flag system-icu
78     %else
79     %global icu_flag small-icu
80     %endif
81    
82    
83 neoclust 1015662 # punycode - from lib/punycode.js
84     # Note: this was merged into the mainline since 0.6.x
85 kekepower 1394313 # Note: this will be unmerged in an upcoming major release
86 shlomif 1066886 %global punycode_major 2
87 joequant 1256930 %global punycode_minor 1
88 shlomif 1066886 %global punycode_patch 0
89 neoclust 1015662 %global punycode_version %{punycode_major}.%{punycode_minor}.%{punycode_patch}
90    
91     # npm - from deps/npm/package.json
92 luigiwalser 1050787 %global npm_epoch 1
93 joequant 1256930 %global npm_major 6
94 kekepower 1419759 %global npm_minor 9
95     %global npm_patch 0
96 neoclust 1015662 %global npm_version %{npm_major}.%{npm_minor}.%{npm_patch}
97    
98 neoclust 1131239 # In order to avoid needing to keep incrementing the release version for the
99     # main package forever, we will just construct one for npm that is guaranteed
100     # to increment safely. Changing this can only be done during an update when the
101     # base npm version number is increasing.
102 kekepower 1394313 %global npm_release %{nodejs_epoch}.%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}.%{nodejs_release}
103 neoclust 1131239
104 neoclust 1015662
105     Name: nodejs
106 neoclust 1131239 Epoch: %{nodejs_epoch}
107 neoclust 1015662 Version: %{nodejs_version}
108 kekepower 1394313 Release: %mkrel %{nodejs_release}
109 neoclust 1015662 Summary: JavaScript runtime
110     License: MIT and ASL 2.0 and ISC and BSD
111     Group: Development/Other
112     URL: http://nodejs.org/
113    
114 kekepower 1394313 # ExclusiveArch: %{nodejs_arches}
115    
116 neoclust 1015662 # nodejs bundles openssl, but we use the system version in Mageia
117     # because openssl contains prohibited code, we remove openssl completely from
118     # the tarball, using the script in Source100
119 joequant 1394644
120 joequant 1256930 Source0: node-v%{nodejs_version}-stripped.tar.xz
121 neoclust 1015662 Source100: %{name}-tarball.sh
122    
123 tv 726001 # The native module Requires generator remains in the nodejs SRPM, so it knows
124     # the nodejs and v8 versions. The remainder has migrated to the
125     # nodejs-packaging SRPM.
126     Source7: nodejs_native.attr
127    
128     # Disable running gyp on bundled deps we don't use
129 kekepower 1394313 Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
130 joequant 912085
131 joequant 1256930 # Suppress the message from npm to run `npm -g update npm`
132     # This does bad things on an RPM-managed npm.
133     Patch2: 0002-Suppress-NPM-message-to-run-global-update.patch
134    
135 kekepower 1394313 # Patch to install both node and libnode.so, using the correct libdir
136     Patch3: 0003-Install-both-binaries-and-use-libdir.patch
137 shikamaru 77825
138 kekepower 1394313 BuildRequires: python2-devel
139     BuildRequires: python3-devel
140     BuildRequires: zlib-devel
141     BuildRequires: gcc >= 4.9.4
142     BuildRequires: gcc-c++ >= 4.9.4
143     BuildRequires: chrpath
144    
145     #%if ! 0%%{?bootstrap}
146     %if %{with bootstrap}
147     Provides: bundled(http-parser) = %{http_parser_version}
148     Provides: bundled(libuv) = %{libuv_version}
149     Provides: bundled(nghttp2) = %{nghttp2_version}
150     %else
151     BuildRequires: nodejs-packaging
152 neoclust 1131255 BuildRequires: systemtap
153 kekepower 1394594 BuildRequires: http-parser-devel >= 2.9.2
154 kekepower 1394313 BuildRequires: libuv-devel >= %{libuv_version}
155     BuildRequires: pkgconfig(libnghttp2) >= %{nghttp2_version}
156 neoclust 1131239 %endif
157    
158    
159 kekepower 1394313 BuildRequires: libicu-devel >= 63.1
160    
161     BuildRequires: openssl-devel
162    
163     # we need the system certificate store
164     Requires: ca-certificates
165    
166 kekepower 1394850 Requires: nodejs-libs = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
167 kekepower 1394313
168    
169 joequant 693134 #we need ABI virtual provides where SONAMEs aren't enough/not present so deps
170     #break when binary compatibility is broken
171     Provides: nodejs(abi) = %{nodejs_abi}
172 neoclust 1015662 Provides: nodejs(abi%{nodejs_major}) = %{nodejs_abi}
173 joequant 912085 Provides: nodejs(v8-abi) = %{v8_abi}
174 neoclust 1131239 Provides: nodejs(v8-abi%{v8_major}) = %{v8_abi}
175 joequant 693134
176     #this corresponds to the "engine" requirement in package.json
177 luigiwalser 1050787 Provides: nodejs(engine) = %{nodejs_version}
178 joequant 693134
179 neoclust 1015662 # Node.js currently has a conflict with the 'node' package in Mageia
180     # The ham-radio group has agreed to rename their binary for us, but
181     # in the meantime, we're setting an explicit Conflicts: here
182     Conflicts: node <= 0.3.2-12
183    
184 joequant 912085 # The punycode module was absorbed into the standard library in v0.6.
185     # It still exists as a seperate package for the benefit of users of older
186 neoclust 1016406 # versions. Since we've never shipped anything older than v0.10 in Mageia,
187 joequant 912085 # we don't need the seperate nodejs-punycode package, so we Provide it here so
188     # dependent packages don't need to override the dependency generator.
189     # See also: RHBZ#11511811
190 neoclust 1131239 # UPDATE: punycode will be deprecated and so we should unbundle it in Node v8
191     # and use upstream module instead
192     # https://github.com/nodejs/node/commit/29e49fc286080215031a81effbd59eac092fff2f
193 neoclust 1015662 Provides: nodejs-punycode = %{punycode_version}
194     Provides: npm(punycode) = %{punycode_version}
195 joequant 912085
196 neoclust 1015662
197 joequant 912085 # Node.js has forked c-ares from upstream in an incompatible way, so we need
198     # to carry the bundled version internally.
199     # See https://github.com/nodejs/node/commit/766d063e0578c0f7758c3a965c971763f43fec85
200 neoclust 1015662 Provides: bundled(c-ares) = %{c_ares_version}
201 joequant 912085
202     # Node.js is closely tied to the version of v8 that is used with it. It makes
203     # sense to use the bundled version because upstream consistently breaks ABI
204     # even in point releases. Node.js upstream has now removed the ability to build
205     # against a shared system version entirely.
206     # See https://github.com/nodejs/node/commit/d726a177ed59c37cf5306983ed00ecd858cfbbef
207 neoclust 1015662 Provides: bundled(v8) = %{v8_version}
208 joequant 912085
209 kekepower 1394313 # Node.js is bound to a specific version of ICU which may not match the OS
210     # We cannot pin the OS to this version of ICU because every update includes
211     # an ABI-break, so we'll use the bundled copy.
212     Provides: bundled(icu) = %{icu_version}
213 neoclust 1142549
214 luigiwalser 1050787 # Make sure we keep NPM up to date when we update Node.js
215 kekepower 1394850 Requires: npm = %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist}
216 neoclust 1015662
217 shikamaru 77825 %description
218 joequant 693134 Node.js is a platform built on Chrome's JavaScript runtime
219     for easily building fast, scalable network applications.
220     Node.js uses an event-driven, non-blocking I/O model that
221     makes it lightweight and efficient, perfect for data-intensive
222     real-time applications that run across distributed devices.
223 shikamaru 77825
224 joequant 912085 %package devel
225     Summary: JavaScript runtime - development headers
226 kekepower 1394478 Group: Development/Other
227 kekepower 1394850 Requires: %{name} = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
228 kekepower 1394313 Requires: openssl-devel
229 kekepower 1394774 Requires: zlib-devel
230 joequant 912085 Requires: nodejs-packaging
231 kekepower 1394313
232     #%if ! 0%%{?bootstrap}
233     %if %{with bootstrap}
234     # deps are bundled
235     %else
236 cjw 1151179 Requires: http-parser-devel
237 kekepower 1394313 Requires: libuv-devel
238 neoclust 1131239 %endif
239 joequant 912085
240     %description devel
241 neoclust 1015662 Development headers for the Node.js JavaScript runtime.
242 joequant 912085
243 kekepower 1394313 %package libs
244     Summary: Node.js and v8 libraries
245    
246     # Compatibility for obsolete v8 package
247     %if 0%{?__isa_bits} == 64
248     Provides: libv8.so.%{v8_major}()(64bit)
249     Provides: libv8_libbase.so.%{v8_major}()(64bit)
250     Provides: libv8_libplatform.so.%{v8_major}()(64bit)
251     %else # 32-bits
252     Provides: libv8.so.%{v8_major}
253     Provides: libv8_libbase.so.%{v8_major}
254     Provides: libv8_libplatform.so.%{v8_major}
255     %endif
256    
257 kekepower 1394850 Provides: v8 = %{v8_epoch}:%{v8_version}-%{nodejs_release}%{?dist}
258     Provides: v8 = %{v8_epoch}:%{v8_version}-%{nodejs_release}%{?dist}
259 kekepower 1394313 Obsoletes: v8 < 1:6.7.17-10
260    
261     %description libs
262     Libraries to support Node.js and provide stable v8 interfaces.
263    
264     %package -n v8-devel
265     Summary: v8 - development headers
266     Epoch: %{v8_epoch}
267 kekepower 1419790 Version: %{v8_version}%{?dist}
268 kekepower 1394850 Requires: %{name}-devel = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
269 kekepower 1394313
270     %description -n v8-devel
271     Development headers for the v8 runtime.
272    
273 luigiwalser 1050787 %package -n npm
274     Summary: Node.js Package Manager
275     Epoch: %{npm_epoch}
276     Version: %{npm_version}
277 kekepower 1394850 Release: %{npm_release}%{?dist}
278 luigiwalser 1050787
279     # We used to ship npm separately, but it is so tightly integrated with Node.js
280     # (and expected to be present on all Node.js systems) that we ship it bundled
281     # now.
282     Obsoletes: npm < 0:3.5.4-6
283 kekepower 1394313 Provides: npm = %{npm_epoch}:%{npm_version}
284 kekepower 1394850 Requires: nodejs = %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
285 luigiwalser 1050787
286     # Do not add epoch to the virtual NPM provides or it will break
287     # the automatic dependency-generation script.
288     Provides: npm(npm) = %{npm_version}
289    
290     %description -n npm
291     npm is a package manager for node.js. You can use it to install and publish
292     your node programs. It manages dependencies and does other cool stuff.
293    
294 neoclust 1015662 %package docs
295     Summary: Node.js API documentation
296     Group: Documentation
297     BuildArch: noarch
298 dams 406446
299 neoclust 1015662 # We don't require that the main package be installed to
300     # use the docs, but if it is installed, make sure the
301     # version always matches
302 kekepower 1394850 Conflicts: %{name} > %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
303     Conflicts: %{name} < %{epoch}:%{nodejs_version}-%{nodejs_release}%{?dist}
304 neoclust 1015662
305     %description docs
306 dams 406446 The API documentation for the Node.js JavaScript runtime.
307    
308 neoclust 1015662
309 shikamaru 77825 %prep
310 kekepower 1394313 %autosetup -p1 -n node-v%{nodejs_version}
311 joequant 1005991
312 neoclust 1015662 # remove bundled dependencies that we aren't building
313 kekepower 1394313 rm -rf deps/zlib
314 shikamaru 77825
315 joequant 1256930 # Replace any instances of unversioned python' with python2
316 kekepower 1394313 pathfix.py -i %{__python2} -pn $(find -type f)
317 joequant 1256930 find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python2~" {} \;
318     find . -type f -exec sed -i "s~/usr\/bin\/python\W~/usr/bin/python2~" {} \;
319     sed -i "s~python~python2~" $(find . -type f | grep "gyp$")
320     sed -i "s~usr\/bin\/python2~usr\/bin\/python3~" ./deps/v8/tools/gen-inlining-tests.py
321     sed -i "s~usr\/bin\/python.*$~usr\/bin\/python2~" ./deps/v8/tools/mb/mb_unittest.py
322     find . -type f -exec sed -i "s~python -c~python2 -c~" {} \;
323     sed -i "s~which('python')~which('python2')~" configure
324    
325 joequant 912085 %build
326 kekepower 1394313
327 joequant 912085 # build with debugging symbols and add defines from libuv (#892601)
328 luigiwalser 1050787 # Node's v8 breaks with GCC 6 because of incorrect usage of methods on
329 neoclust 1015662 # NULL objects. We need to pass -fno-delete-null-pointer-checks
330 neoclust 1131239 export CFLAGS='%{optflags} -g \
331     -D_LARGEFILE_SOURCE \
332     -D_FILE_OFFSET_BITS=64 \
333     -DZLIB_CONST \
334     -fno-delete-null-pointer-checks'
335     export CXXFLAGS='%{optflags} -g \
336     -D_LARGEFILE_SOURCE \
337     -D_FILE_OFFSET_BITS=64 \
338     -DZLIB_CONST \
339     -fno-delete-null-pointer-checks'
340 dams 406446
341 neoclust 1099100 # Explicit new lines in C(XX)FLAGS can break naive build scripts
342     export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')"
343     export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
344    
345 kekepower 1394313 #export LDFLAGS="%{build_ldflags}"
346    
347     #%if ! 0%%{?bootstrap}
348     %if %{with bootstrap}
349 neoclust 1015662 ./configure --prefix=%{_prefix} \
350 kekepower 1394313 --shared \
351     --libdir=%{_lib} \
352 neoclust 1015662 --shared-openssl \
353     --shared-zlib \
354 kekepower 1394313 --without-dtrace \
355     --with-intl=small-icu \
356     --debug-nghttp2 \
357 neoclust 1099100 --openssl-use-def-ca-store
358 neoclust 1131239 %else
359     ./configure --prefix=%{_prefix} \
360 kekepower 1394313 --shared \
361     --libdir=%{_lib} \
362 neoclust 1131239 --shared-openssl \
363     --shared-zlib \
364     --shared-libuv \
365 kekepower 1394313 --shared-http-parser \
366     --shared-nghttp2 \
367     --with-dtrace \
368     --with-intl=%{icu_flag} \
369 neoclust 1142549 --debug-nghttp2 \
370 neoclust 1131239 --openssl-use-def-ca-store
371     %endif
372 shikamaru 77825
373 kekepower 1223856 %__make BUILDTYPE=Release %{?_smp_mflags}
374 joequant 912085
375 neoclust 1015662
376 shikamaru 77825 %install
377 kekepower 1394313 rm -rf %{buildroot}
378    
379 joequant 912085 ./tools/install.py install %{buildroot} %{_prefix}
380    
381 neoclust 1015662 # Set the binary permissions properly
382     chmod 0755 %{buildroot}/%{_bindir}/node
383 kekepower 1394313 chrpath --delete %{buildroot}%{_bindir}/node
384 neoclust 1015662
385 kekepower 1394313 # Install library symlink
386     ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/libnode.so
387 joequant 912085
388 kekepower 1394313 # Install v8 compatibility symlinks
389     for header in %{buildroot}%{_includedir}/node/libplatform %{buildroot}%{_includedir}/node/v8*.h; do
390     header=$(basename ${header})
391     ln -s %{_includedir}/node/${header} %{buildroot}%{_includedir}/${header}
392     done
393     for soname in libv8 libv8_libbase libv8_libplatform; do
394     ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/${soname}.so
395     ln -s %{_libdir}/libnode.so.%{nodejs_soversion} %{buildroot}%{_libdir}/${soname}.so.%{v8_major}
396     done
397    
398 joequant 912085 # own the sitelib directory
399     mkdir -p %{buildroot}%{_prefix}/lib/node_modules
400    
401 tv 726001 # ensure Requires are added to every native module that match the Provides from
402     # the nodejs build in the buildroot
403     install -Dpm0644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs_native.attr
404     cat << EOF > %{buildroot}%{_rpmconfigdir}/nodejs_native.req
405     #!/bin/sh
406 neoclust 1015662 echo 'nodejs(abi%{nodejs_major}) >= %nodejs_abi'
407 neoclust 1131239 echo 'nodejs(v8-abi%{v8_major}) >= %v8_abi'
408 tv 726001 EOF
409     chmod 0755 %{buildroot}%{_rpmconfigdir}/nodejs_native.req
410    
411 neoclust 1015662 #install documentation
412     mkdir -p %{buildroot}%{_pkgdocdir}/html
413     cp -pr doc/* %{buildroot}%{_pkgdocdir}/html
414     rm -f %{buildroot}%{_pkgdocdir}/html/nodejs.1
415 dams 406446
416 neoclust 1015662 #node-gyp needs common.gypi too
417     mkdir -p %{buildroot}%{_datadir}/node
418     cp -p common.gypi %{buildroot}%{_datadir}/node
419 joequant 859093
420 joequant 912085 # Install the GDB init tool into the documentation directory
421 neoclust 1015662 mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit
422 joequant 912085
423 neoclust 1015662 # install NPM docs to mandir
424     mkdir -p %{buildroot}%{_mandir} \
425     %{buildroot}%{_pkgdocdir}/npm
426    
427     cp -pr deps/npm/man/* %{buildroot}%{_mandir}/
428     rm -rf %{buildroot}%{_prefix}/lib/node_modules/npm/man
429     ln -sf %{_mandir} %{buildroot}%{_prefix}/lib/node_modules/npm/man
430    
431     # Install Markdown and HTML documentation to %{_pkgdocdir}
432     cp -pr deps/npm/html deps/npm/doc %{buildroot}%{_pkgdocdir}/npm/
433     rm -rf %{buildroot}%{_prefix}/lib/node_modules/npm/html \
434     %{buildroot}%{_prefix}/lib/node_modules/npm/doc
435    
436     ln -sf %{_pkgdocdir} %{buildroot}%{_prefix}/lib/node_modules/npm/html
437     ln -sf %{_pkgdocdir}/npm/html %{buildroot}%{_prefix}/lib/node_modules/npm/doc
438    
439    
440 neoclust 1131239 # Node tries to install some python files into a documentation directory
441     # (and not the proper one). Remove them for now until we figure out what to
442     # do with them.
443     rm -f %{buildroot}/%{_defaultdocdir}/node/lldb_commands.py \
444     %{buildroot}/%{_defaultdocdir}/node/lldbinit
445    
446 kekepower 1394313 # Some NPM bundled deps are executable but should not be. This causes
447     # unnecessary automatic dependencies to be added. Make them not executable.
448     # Skip the npm bin directory or the npm binary will not work.
449     find %{buildroot}%{_prefix}/lib/node_modules/npm \
450     -not -path "%{buildroot}%{_prefix}/lib/node_modules/npm/bin/*" \
451     -executable -type f \
452     -exec chmod -x {} \;
453    
454     # The above command is a little overzealous. Add a few permissions back.
455     chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp
456     chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
457    
458    
459 neoclust 1015662 %check
460     # Fail the build if the versions don't match
461 kekepower 1394313 LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.node, '%{nodejs_version}')"
462     LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')"
463     LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.ares.replace(/-DEV$/, ''), '%{c_ares_version}')"
464 neoclust 1015662
465     # Ensure we have punycode and that the version matches
466 kekepower 1394313 LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')"
467 neoclust 1015662
468 neoclust 1131239 # Ensure we have npm and that the version matches
469 kekepower 1394313 NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"npm\").version, '%{npm_version}')"
470 tv 1016533
471 kekepower 1394313
472     %pretrans -n npm -p <lua>
473     -- Remove all of the symlinks from the bundled npm node_modules directory
474     -- This scriptlet can be removed in Mageia 31
475     base_path = "%{_prefix}/lib/node_modules/npm/node_modules/"
476     d_st = posix.stat(base_path)
477     if d_st then
478     for f in posix.files(base_path) do
479     path = base_path..f
480     st = posix.stat(path)
481     if st and st.type == "link" then
482     os.remove(path)
483     end
484     end
485     end
486    
487 shikamaru 77825 %files
488 dams 406446 %{_bindir}/node
489 neoclust 1015662 %dir %{_prefix}/lib/node_modules
490     %dir %{_datadir}/node
491 joequant 912085 %dir %{_datadir}/systemtap
492     %dir %{_datadir}/systemtap/tapset
493     %{_datadir}/systemtap/tapset/node.stp
494 neoclust 1131239
495 kekepower 1394313 #%if ! 0%%{?bootstrap}
496     %if %{with bootstrap}
497     # no dtrace
498     %else
499 neoclust 1131239 %dir %{_usr}/lib/dtrace
500     %{_usr}/lib/dtrace/node.d
501     %endif
502    
503 tv 726001 %{_rpmconfigdir}/fileattrs/nodejs_native.attr
504     %{_rpmconfigdir}/nodejs_native.req
505 joequant 912085 %license LICENSE
506     %doc AUTHORS CHANGELOG.md COLLABORATOR_GUIDE.md GOVERNANCE.md README.md
507 neoclust 1131239 %doc %{_mandir}/man1/node.1*
508 dams 406446
509 neoclust 1015662
510 joequant 912085 %files devel
511 neoclust 1015662 %{_includedir}/node
512 kekepower 1394313 %{_libdir}/libnode.so
513 neoclust 1015662 %{_datadir}/node/common.gypi
514     %{_pkgdocdir}/gdbinit
515 joequant 912085
516 neoclust 1131239
517 kekepower 1394313 %files libs
518     %{_libdir}/libnode.so.%{nodejs_soversion}
519     %{_libdir}/libv8.so.%{v8_major}
520     %{_libdir}/libv8_libbase.so.%{v8_major}
521     %{_libdir}/libv8_libplatform.so.%{v8_major}
522    
523    
524     %files -n v8-devel
525     %{_includedir}/libplatform
526     %{_includedir}/v8*.h
527     %{_libdir}/libv8.so
528     %{_libdir}/libv8_libbase.so
529     %{_libdir}/libv8_libplatform.so
530    
531    
532 luigiwalser 1050787 %files -n npm
533     %{_bindir}/npm
534 neoclust 1142549 %{_bindir}/npx
535 neoclust 1131239 %{_prefix}/lib/node_modules/npm
536     %ghost %{_sysconfdir}/npmrc
537     %ghost %{_sysconfdir}/npmignore
538     %doc %{_mandir}/man*/npm*
539 neoclust 1142549 %doc %{_mandir}/man*/npx*
540 neoclust 1131239 %doc %{_mandir}/man5/package.json.5*
541 neoclust 1142549 %doc %{_mandir}/man5/package-lock.json.5*
542 neoclust 1131239 %doc %{_mandir}/man7/removing-npm.7*
543     %doc %{_mandir}/man7/semver.7*
544 luigiwalser 1050787
545 neoclust 1131239
546 joequant 912085 %files docs
547 neoclust 1015662 %dir %{_pkgdocdir}
548     %{_pkgdocdir}/html
549     %{_pkgdocdir}/npm/html
550 tv 1178553 %{_pkgdocdir}/npm/doc
551 kekepower 1394313

  ViewVC Help
Powered by ViewVC 1.1.30