Import package vendor original spec for necessary manipulations.

Mon, 15 Oct 2012 21:20:29 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 15 Oct 2012 21:20:29 +0200
changeset 741
c6ce86a2b636
parent 740
e7caf02f98eb
child 742
36814bf43709

Import package vendor original spec for necessary manipulations.

node/node.patch file | annotate | diff | comparison | revisions
node/node.spec file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/node/node.patch	Mon Oct 15 21:20:29 2012 +0200
     1.3 @@ -0,0 +1,51 @@
     1.4 +Index: common.gypi
     1.5 +--- common.gypi.orig	2012-07-19 19:01:56.000000000 +0200
     1.6 ++++ common.gypi	2012-07-22 14:02:09.000000000 +0200
     1.7 +@@ -153,7 +153,7 @@
     1.8 +         ],
     1.9 +       }],
    1.10 +       [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
    1.11 +-        'cflags': [ '-Wall', '-pthread', ],
    1.12 ++        'cflags': [ '-pthread', ],
    1.13 +         'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
    1.14 +         'ldflags': [ '-pthread', '-rdynamic' ],
    1.15 +         'conditions': [
    1.16 +Index: configure
    1.17 +--- configure.orig	2012-07-19 19:01:56.000000000 +0200
    1.18 ++++ configure	2012-07-22 14:02:09.000000000 +0200
    1.19 +@@ -332,9 +332,9 @@
    1.20 +   if options.shared_v8_libpath:
    1.21 +     o['libraries'] += ['-L%s' % options.shared_v8_libpath]
    1.22 +   if options.shared_v8_libname:
    1.23 +-    o['libraries'] += ['-l%s' % options.shared_v8_libname]
    1.24 ++    o['libraries'] += ['-l%s -lexecinfo' % options.shared_v8_libname]
    1.25 +   elif options.shared_v8:
    1.26 +-    o['libraries'] += ['-lv8']
    1.27 ++    o['libraries'] += ['-lv8 -lexecinfo']
    1.28 +   if options.shared_v8_includes:
    1.29 +     o['include_dirs'] += [options.shared_v8_includes]
    1.30 + 
    1.31 +Index: deps/npm/lib/build.js
    1.32 +--- deps/npm/lib/build.js.orig	2012-07-19 19:01:56.000000000 +0200
    1.33 ++++ deps/npm/lib/build.js	2012-07-22 14:02:09.000000000 +0200
    1.34 +@@ -166,7 +166,7 @@
    1.35 + 
    1.36 + function linkMans (pkg, folder, parent, gtop, cb) {
    1.37 +   if (!pkg.man || !gtop || process.platform === "win32") return cb()
    1.38 +-  var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
    1.39 ++  var manRoot = path.resolve(npm.config.get("prefix"), "man")
    1.40 +   asyncMap(pkg.man, function (man, cb) {
    1.41 +     if (typeof man !== "string") return cb()
    1.42 +     var parseMan = man.match(/(.*)\.([0-9]+)(\.gz)?$/)
    1.43 +Index: tools/install.py
    1.44 +--- tools/install.py.orig	2012-09-11 20:08:07.000000000 +0200
    1.45 ++++ tools/install.py	2012-09-15 12:03:31.000000000 +0200
    1.46 +@@ -191,7 +191,7 @@
    1.47 +           'deps/uv/include/uv-private/uv-unix.h',
    1.48 +           'deps/uv/include/uv-private/uv-win.h'],
    1.49 +           'include/node/uv-private/')
    1.50 +-  action(['doc/node.1'], 'share/man/man1/')
    1.51 ++  action(['doc/node.1'], 'man/man1/')
    1.52 +   action(['out/Release/node'], 'bin/node')
    1.53 + 
    1.54 +   # install unconditionally, checking if the platform supports dtrace doesn't
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/node/node.spec	Mon Oct 15 21:20:29 2012 +0200
     2.3 @@ -0,0 +1,108 @@
     2.4 +##
     2.5 +##  node.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package information
    2.28 +Name:         node
    2.29 +Summary:      Node JavaScript Server
    2.30 +URL:          http://nodejs.org/
    2.31 +Vendor:       Joyent, Inc.
    2.32 +Packager:     OpenPKG Foundation e.V.
    2.33 +Distribution: OpenPKG Community
    2.34 +Class:        EVAL
    2.35 +Group:        Web
    2.36 +License:      MIT/BSD
    2.37 +Version:      0.8.11
    2.38 +Release:      20121006
    2.39 +
    2.40 +#   list of sources
    2.41 +Source0:      http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
    2.42 +Patch0:       node.patch
    2.43 +
    2.44 +#   build information
    2.45 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, python
    2.46 +PreReq:       OpenPKG, openpkg >= 20100101
    2.47 +BuildPreReq:  openssl, libexecinfo, v8, zlib
    2.48 +PreReq:       openssl, libexecinfo, v8, zlib
    2.49 +
    2.50 +%description
    2.51 +    Node.js provides an easy way to build scalable network servers in
    2.52 +    JavaScript. It is an event-driven I/O environment based on Google V8
    2.53 +    JavaScript virtual machine.
    2.54 +
    2.55 +%track
    2.56 +    prog node = {
    2.57 +        version   = %{version}
    2.58 +        url       = http://nodejs.org/
    2.59 +        regex     = node-v(__VER__)\.tar\.gz
    2.60 +    }
    2.61 +
    2.62 +%prep
    2.63 +    %setup -q -n node-v%{version}
    2.64 +    %patch -p0
    2.65 +
    2.66 +%build
    2.67 +    %{l_shtool} subst \
    2.68 +        -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \
    2.69 +        deps/npm/cli.js \
    2.70 +        deps/npm/bin/npm-cli.js \
    2.71 +        deps/npm/scripts/index-build.js \
    2.72 +        deps/npm/node_modules/semver/bin/semver \
    2.73 +        deps/npm/node_modules/which/bin/which \
    2.74 +        deps/npm/node_modules/nopt/bin/nopt.js
    2.75 +    libs="-lexecinfo"
    2.76 +    case "%{l_platform -t} " in
    2.77 +        *-linux* ) libs="$libs -ldl" ;;
    2.78 +    esac
    2.79 +    CC="%{l_cc}" \
    2.80 +    CXX="%{l_cxx}" \
    2.81 +    CFLAGS="%{l_cflags -O}" \
    2.82 +    CXXFLAGS="%{l_cxxflags -O}" \
    2.83 +    CPPFLAGS="%{l_cppflags}" \
    2.84 +    LDFLAGS="%{l_ldflags}" \
    2.85 +    LIBS="$libs" \
    2.86 +    %{l_prefix}/bin/python ./configure \
    2.87 +        --prefix=%{l_prefix} \
    2.88 +        --openssl-use-sys \
    2.89 +        --openssl-includes=%{l_prefix}/include \
    2.90 +        --openssl-libpath=%{l_prefix}/lib \
    2.91 +        --shared-v8 \
    2.92 +        --shared-v8-includes=%{l_prefix}/include \
    2.93 +        --shared-v8-libpath=%{l_prefix}/lib \
    2.94 +        --shared-v8-libname=v8 \
    2.95 +        --shared-zlib \
    2.96 +        --shared-zlib-includes=%{l_prefix}/include \
    2.97 +        --shared-zlib-libpath=%{l_prefix}/lib
    2.98 +    %{l_make} %{l_mflags -O}
    2.99 +
   2.100 +%install
   2.101 +    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   2.102 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.103 +    %{l_shtool} mkdir -f -p -m 755 \
   2.104 +        $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \
   2.105 +        $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3
   2.106 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   2.107 +
   2.108 +%files -f files
   2.109 +
   2.110 +%clean
   2.111 +

mercurial