node/node.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 742
36814bf43709
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  node.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         node
    26 Summary:      Node JavaScript Server
    27 URL:          http://nodejs.org/
    28 Vendor:       Joyent, Inc.
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        EVAL
    32 Group:        Web
    33 License:      MIT/BSD
    34 Version:      0.8.12
    35 Release:      20120800
    37 #   list of sources
    38 Source0:      http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
    39 Patch0:       node.patch
    41 #   build information
    42 BuildPreReq:  OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes
    43 PreReq:       OpenPKG, openpkg >= 20100101
    44 BuildPreReq:  openssl, libexecinfo, v8, zlib, python, pkgconfig
    45 PreReq:       openssl, libexecinfo, v8, zlib
    47 %description
    48     Node.js provides an easy way to build scalable network servers in
    49     JavaScript. It is an event driven I/O environment based on Google
    50     V8 JavaScript virtual machine.
    52 %track
    53     prog node = {
    54         version   = %{version}
    55         url       = http://nodejs.org/
    56         regex     = node-v(__VER__)\.tar\.gz
    57     }
    59 %prep
    60     %setup -q -n node-v%{version}
    61     %patch -p0
    63 %build
    64     %{l_shtool} subst \
    65         -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \
    66         deps/npm/cli.js \
    67         deps/npm/bin/npm-cli.js \
    68         deps/npm/scripts/index-build.js \
    69         deps/npm/node_modules/semver/bin/semver \
    70         deps/npm/node_modules/which/bin/which \
    71         deps/npm/node_modules/nopt/bin/nopt.js
    72     libs="-lexecinfo"
    73     case "%{l_platform -t} " in
    74         *-linux* ) libs="$libs -ldl" ;;
    75     esac
    76     CC="%{l_cc}" \
    77     CXX="%{l_cxx}" \
    78     CFLAGS="%{l_cflags -O}" \
    79     CXXFLAGS="%{l_cxxflags -O}" \
    80     CPPFLAGS="%{l_cppflags}" \
    81     LDFLAGS="%{l_ldflags}" \
    82     LIBS="$libs" \
    83     %{l_prefix}/bin/python ./configure \
    84         --prefix=%{l_prefix} \
    85         --openssl-use-sys \
    86         --openssl-includes=%{l_prefix}/include \
    87         --openssl-libpath=%{l_prefix}/lib \
    88         --shared-v8 \
    89         --shared-v8-includes=%{l_prefix}/include \
    90         --shared-v8-libpath=%{l_prefix}/lib \
    91         --shared-v8-libname=v8 \
    92         --shared-zlib \
    93         --shared-zlib-includes=%{l_prefix}/include \
    94         --shared-zlib-libpath=%{l_prefix}/lib \
    95         --without-dtrace
    96     %{l_make} %{l_mflags -O}
    98 %install
    99     %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   100     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   101     %{l_shtool} mkdir -f -p -m 755 \
   102         $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \
   103         $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3
   104     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   106 %files -f files
   108 %clean

mercurial