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

Revision 7548, 9.1 KB checked in by daisuke, 11 years ago (diff)

nodejs: update to 0.10.0

Line 
1Name: nodejs
2Version: 0.10.0
3Release: 1%{?_dist_release}
4Summary: JavaScript runtime
5Summary(ja): JavaScript runtime
6License: MIT and ASL 2.0 and ISC and BSD
7Group: Development/Languages
8URL: http://nodejs.org/
9
10# Exclusive archs must match v8
11ExclusiveArch: %{ix86} x86_64 %{arm}
12
13Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
14Source1: macros.nodejs
15Source2: nodejs.attr
16Source3: nodejs.prov
17Source4: nodejs.req
18Source5: nodejs-symlink-deps
19Source6: nodejs-fixdep
20
21# V8 presently breaks ABI at least every x.y release while never bumping SONAME,
22# so we need to be more explicit until spot fixes that
23%global v8_ge 3.13.7.5
24%global v8_lt 3.14
25
26BuildRequires: v8-devel >= %{v8_ge}
27#BuildRequires: http-parser-devel >= 2.0
28#BuildRequires: libuv-devel
29#BuildRequires: c-ares-devel
30BuildRequires: zlib-devel
31# Node.js requires some features from openssl 1.0.1 for SPDY support
32BuildRequires: openssl-devel >= 1.0.1
33
34Requires: v8%{?isa}
35Requires: v8%{?isa} < %{v8_lt}
36
37#virtual provides for automatic depedency generation
38Provides: nodejs(engine) = %{version}
39
40#npm
41Provides: npm = %{version}-%{release}
42
43# Node.js currently has a conflict with the 'node' package in Fedora
44# The ham-radio group has agreed to rename their binary for us, but
45# in the meantime, we're setting an explicit Conflicts: here
46Conflicts: node <= 0.3.2-11
47
48%description
49Node.js is a platform built on Chrome's JavaScript runtime
50for easily building fast, scalable network applications.
51Node.js uses an event-driven, non-blocking I/O model that
52makes it lightweight and efficient, perfect for data-intensive
53real-time applications that run across distributed devices.
54
55%package devel
56Summary: JavaScript runtime - development headers
57Summary(ja): JavaScript runtime - development headers
58Group: Development/Languages
59Requires: %{name} == %{version}-%{release}
60#Requires: libuv-devel http-parser-devel openssl-devel c-ares-devel zlib-devel
61Requires: openssl-devel zlib-devel
62
63%description devel
64Development headers for the Node.js JavaScript runtime.
65
66%package docs
67Summary: Node.js API documentation
68Summary(ja): Node.js API documentation
69Group: Documentation
70
71%description docs
72The API documentation for the Node.js JavaScript runtime.
73
74%prep
75%setup -q -n node-v%{version}
76
77# Make sure nothing gets included from bundled deps:
78# We only delete the source and header files, because
79# the remaining build scripts are still used.
80
81#find deps/cares -name "*.c" -exec rm -f {} \;
82#find deps/cares -name "*.h" -exec rm -f {} \;
83
84#find deps/npm -name "*.c" -exec rm -f {} \;
85#find deps/npm -name "*.h" -exec rm -f {} \;
86
87find deps/zlib -name "*.c" -exec rm -f {} \;
88find deps/zlib -name "*.h" -exec rm -f {} \;
89
90find deps/v8 -name "*.c" -exec rm -f {} \;
91find deps/v8 -name "*.h" -exec rm -f {} \;
92
93#find deps/http_parser -name "*.c" -exec rm -f {} \;
94#find deps/http_parser -name "*.h" -exec rm -f {} \;
95
96find deps/openssl -name "*.c" -exec rm -f {} \;
97find deps/openssl -name "*.h" -exec rm -f {} \;
98
99#find deps/uv -name "*.c" -exec rm -f {} \;
100#find deps/uv -name "*.h" -exec rm -f {} \;
101
102%build
103# build with debugging symbols and add defines from libuv (#892601)
104export CFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
105export CXXFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
106
107./configure --prefix=%{_prefix} \
108           --shared-v8 \
109           --shared-openssl \
110           --shared-zlib \
111            --without-dtrace
112
113# Setting BUILDTYPE=Debug builds both release and debug binaries
114make BUILDTYPE=Debug %{?_smp_mflags}
115
116%install
117rm -rf %{buildroot}
118
119./tools/install.py install %{buildroot}
120
121# and remove dtrace file again
122rm -rf %{buildroot}/%{_prefix}/lib/dtrace
123
124# Set the binary permissions properly
125chmod 0755 %{buildroot}/%{_bindir}/node
126
127# Install the debug binary and set its permissions
128install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g
129
130# own the sitelib directory
131mkdir -p %{buildroot}%{_prefix}/lib/node_modules
132
133# install rpm magic
134install -Dpm0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.nodejs
135install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/fileattrs/nodejs.attr
136install -pm0755 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/nodejs.prov
137install -pm0755 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/nodejs.req
138install -pm0755 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/nodejs-symlink-deps
139install -pm0755 %{SOURCE6} %{buildroot}%{_rpmconfigdir}/nodejs-fixdep
140
141#install documentation
142mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-docs-%{version}/html
143cp -pr doc/* %{buildroot}%{_defaultdocdir}/%{name}-docs-%{version}/html
144rm -f %{_defaultdocdir}/%{name}-docs-%{version}/html/nodejs.1
145
146#install development headers
147#FIXME: we probably don't really need *.h but node-gyp downloads the whole
148#freaking source tree so I can't be sure ATM
149mkdir -p %{buildroot}%{_includedir}/node
150cp -p src/*.h %{buildroot}%{_includedir}/node
151
152#node-gyp needs common.gypi too
153mkdir -p %{buildroot}%{_datadir}/node
154cp -p common.gypi %{buildroot}%{_datadir}/node
155
156%files
157%doc ChangeLog LICENSE README.md AUTHORS
158%{_bindir}/node
159%{_bindir}/npm
160%{_mandir}/man1/node.*
161%dir %{_prefix}/lib/node_modules
162%{_prefix}/lib/node_modules/npm
163
164%files devel
165%{_bindir}/node_g
166%{_includedir}/node
167%{_datadir}/node
168%{_sysconfdir}/rpm/macros.nodejs
169%{_rpmconfigdir}/fileattrs/nodejs.attr
170%{_rpmconfigdir}/nodejs*
171
172%files docs
173#%{_defaultdocdir}/%{name}-docs-%{version}
174%doc LICENSE
175
176%changelog
177* Wed Mar 13 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10.0-1
178- update to 0.10.0
179
180* Mon Mar 11 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1
181- initial build for Vine Linux
182- include npm
183
184* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-11
185- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
186
187* Tue Jan 22 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-10
188- minor bugfixes to RPM magic
189  - nodejs-symlink-deps: don't create an empty node_modules dir when a module
190    has no dependencies
191  - nodes-fixdep: support adding deps when none exist
192- Add the full set of headers usually bundled with node as deps to nodejs-devel.
193  This way `npm install` for native modules that assume the stuff bundled with
194  node exists will usually "just work".
195-move RPM magic to nodejs-devel as requested by FPC
196
197* Sat Jan 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-9
198- fix brown paper bag bug in requires generation script
199
200* Thu Jan 10 2013 Stephen Gallagher <sgallagh@redhat.com> - 0.9.5-8
201- Build debug binary and install it in the nodejs-devel subpackage
202
203* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-7
204- don't use make install since it rebuilds everything
205
206* Thu Jan 10 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-6
207- add %%{?isa}, epoch to v8 deps
208
209* Wed Jan 09 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-5
210- add defines to match libuv (#892601)
211- make v8 dependency explicit (and thus more accurate)
212- add -g to $C(XX)FLAGS instead of patching configure to add it
213- don't write pointless 'npm(foo) > 0' deps
214
215* Sat Jan 05 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-4
216- install development headers
217- add nodejs_sitearch macro
218
219* Wed Jan 02 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-3
220- make nodejs-symlink-deps actually work
221
222* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-2
223- provide nodejs-devel so modules can BuildRequire it (and be consistent
224  with other interpreted languages in the distro)
225
226* Tue Jan 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-1
227- new upstream release 0.9.5
228- provide nodejs-devel for the moment
229- fix minor bugs in RPM magic
230- add nodejs_fixdep macro so packagers can easily adjust dependencies in
231  package.json files
232
233* Wed Dec 26 2012 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.4-1
234- new upstream release 0.9.4
235- system library patches are now upstream
236- respect optflags
237- include documentation in subpackage
238- add RPM dependency generation and related magic
239- guard libuv depedency so it always gets bumped when nodejs does
240- add -devel subpackage with enough to make node-gyp happy
241
242* Wed Dec 19 2012 Dan Horák <dan[at]danny.cz> - 0.9.3-8
243- set exclusive arch list to match v8
244
245* Tue Dec 18 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-7
246- Add remaining changes from code review
247- Remove unnecessary BuildRequires on findutils
248- Remove %%clean section
249
250* Fri Dec 14 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-6
251- Fixes from code review
252- Fix executable permissions
253- Correct the License field
254- Build debuginfo properly
255
256* Thu Dec 13 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-5
257- Return back to using the standard binary name
258- Temporarily adding a conflict against the ham radio node package until they
259  complete an agreed rename of their binary.
260
261* Wed Nov 28 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-4
262- Rename binary and manpage to nodejs
263
264* Mon Nov 19 2012 Stephen Gallagher <sgallagh@redhat.com> - 0.9.3-3
265- Update to latest upstream development release 0.9.3
266- Include upstreamed patches to unbundle dependent libraries
267
268* Tue Oct 23 2012 Adrian Alves <alvesadrian@fedoraproject.org>  0.8.12-1
269- Fixes and Patches suggested by Matthias Runge
270
271* Mon Apr 09 2012 Adrian Alves <alvesadrian@fedoraproject.org> 0.6.5
272- First build.
273
Note: See TracBrowser for help on using the repository browser.