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