# HG changeset patch # User Michael Schloh von Bennewitz # Date 1350328829 -7200 # Node ID c6ce86a2b6368885cbe558baf57bef25f9b814e8 # Parent e7caf02f98eb38641c06bfae392aa3be6514ee80 Import package vendor original spec for necessary manipulations. diff -r e7caf02f98eb -r c6ce86a2b636 node/node.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/node/node.patch Mon Oct 15 21:20:29 2012 +0200 @@ -0,0 +1,51 @@ +Index: common.gypi +--- common.gypi.orig 2012-07-19 19:01:56.000000000 +0200 ++++ common.gypi 2012-07-22 14:02:09.000000000 +0200 +@@ -153,7 +153,7 @@ + ], + }], + [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { +- 'cflags': [ '-Wall', '-pthread', ], ++ 'cflags': [ '-pthread', ], + 'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ], + 'ldflags': [ '-pthread', '-rdynamic' ], + 'conditions': [ +Index: configure +--- configure.orig 2012-07-19 19:01:56.000000000 +0200 ++++ configure 2012-07-22 14:02:09.000000000 +0200 +@@ -332,9 +332,9 @@ + if options.shared_v8_libpath: + o['libraries'] += ['-L%s' % options.shared_v8_libpath] + if options.shared_v8_libname: +- o['libraries'] += ['-l%s' % options.shared_v8_libname] ++ o['libraries'] += ['-l%s -lexecinfo' % options.shared_v8_libname] + elif options.shared_v8: +- o['libraries'] += ['-lv8'] ++ o['libraries'] += ['-lv8 -lexecinfo'] + if options.shared_v8_includes: + o['include_dirs'] += [options.shared_v8_includes] + +Index: deps/npm/lib/build.js +--- deps/npm/lib/build.js.orig 2012-07-19 19:01:56.000000000 +0200 ++++ deps/npm/lib/build.js 2012-07-22 14:02:09.000000000 +0200 +@@ -166,7 +166,7 @@ + + function linkMans (pkg, folder, parent, gtop, cb) { + if (!pkg.man || !gtop || process.platform === "win32") return cb() +- var manRoot = path.resolve(npm.config.get("prefix"), "share", "man") ++ var manRoot = path.resolve(npm.config.get("prefix"), "man") + asyncMap(pkg.man, function (man, cb) { + if (typeof man !== "string") return cb() + var parseMan = man.match(/(.*)\.([0-9]+)(\.gz)?$/) +Index: tools/install.py +--- tools/install.py.orig 2012-09-11 20:08:07.000000000 +0200 ++++ tools/install.py 2012-09-15 12:03:31.000000000 +0200 +@@ -191,7 +191,7 @@ + 'deps/uv/include/uv-private/uv-unix.h', + 'deps/uv/include/uv-private/uv-win.h'], + 'include/node/uv-private/') +- action(['doc/node.1'], 'share/man/man1/') ++ action(['doc/node.1'], 'man/man1/') + action(['out/Release/node'], 'bin/node') + + # install unconditionally, checking if the platform supports dtrace doesn't diff -r e7caf02f98eb -r c6ce86a2b636 node/node.spec --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/node/node.spec Mon Oct 15 21:20:29 2012 +0200 @@ -0,0 +1,108 @@ +## +## node.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package information +Name: node +Summary: Node JavaScript Server +URL: http://nodejs.org/ +Vendor: Joyent, Inc. +Packager: OpenPKG Foundation e.V. +Distribution: OpenPKG Community +Class: EVAL +Group: Web +License: MIT/BSD +Version: 0.8.11 +Release: 20121006 + +# list of sources +Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz +Patch0: node.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, python +PreReq: OpenPKG, openpkg >= 20100101 +BuildPreReq: openssl, libexecinfo, v8, zlib +PreReq: openssl, libexecinfo, v8, zlib + +%description + Node.js provides an easy way to build scalable network servers in + JavaScript. It is an event-driven I/O environment based on Google V8 + JavaScript virtual machine. + +%track + prog node = { + version = %{version} + url = http://nodejs.org/ + regex = node-v(__VER__)\.tar\.gz + } + +%prep + %setup -q -n node-v%{version} + %patch -p0 + +%build + %{l_shtool} subst \ + -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \ + deps/npm/cli.js \ + deps/npm/bin/npm-cli.js \ + deps/npm/scripts/index-build.js \ + deps/npm/node_modules/semver/bin/semver \ + deps/npm/node_modules/which/bin/which \ + deps/npm/node_modules/nopt/bin/nopt.js + libs="-lexecinfo" + case "%{l_platform -t} " in + *-linux* ) libs="$libs -ldl" ;; + esac + CC="%{l_cc}" \ + CXX="%{l_cxx}" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O}" \ + CPPFLAGS="%{l_cppflags}" \ + LDFLAGS="%{l_ldflags}" \ + LIBS="$libs" \ + %{l_prefix}/bin/python ./configure \ + --prefix=%{l_prefix} \ + --openssl-use-sys \ + --openssl-includes=%{l_prefix}/include \ + --openssl-libpath=%{l_prefix}/lib \ + --shared-v8 \ + --shared-v8-includes=%{l_prefix}/include \ + --shared-v8-libpath=%{l_prefix}/lib \ + --shared-v8-libname=v8 \ + --shared-zlib \ + --shared-zlib-includes=%{l_prefix}/include \ + --shared-zlib-libpath=%{l_prefix}/lib + %{l_make} %{l_mflags -O} + +%install + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \ + $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean +