Mon, 15 Oct 2012 21:23:58 +0200
Update to new vendor version, disable flawed dtrace(1) logic, and remove
external dependency to v8 by leveraging the mitgelieferte provided v8
implementation. Seems that v8 is a project that distributes no versioned
code, very yucky.
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, zlib, python, pkgconfig
45 PreReq: openssl, libexecinfo, 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 V8
50 JavaScript virtual machine. This particular Node JS installation uses
51 a locally provided implementation of V8 rather than depending on an
52 externally available V8 installation.
54 %track
55 prog node = {
56 version = %{version}
57 url = http://nodejs.org/
58 regex = node-v(__VER__)\.tar\.gz
59 }
61 %prep
62 %setup -q -n node-v%{version}
63 %patch -p0
65 %build
66 %{l_shtool} subst \
67 -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \
68 deps/npm/cli.js \
69 deps/npm/bin/npm-cli.js \
70 deps/npm/scripts/index-build.js \
71 deps/npm/node_modules/semver/bin/semver \
72 deps/npm/node_modules/which/bin/which \
73 deps/npm/node_modules/nopt/bin/nopt.js
74 libs="-lexecinfo"
75 case "%{l_platform -t} " in
76 *-linux* ) libs="$libs -ldl" ;;
77 esac
78 CC="%{l_cc}" \
79 CXX="%{l_cxx}" \
80 CFLAGS="%{l_cflags -O}" \
81 CXXFLAGS="%{l_cxxflags -O}" \
82 CPPFLAGS="%{l_cppflags}" \
83 LDFLAGS="%{l_ldflags}" \
84 LIBS="$libs" \
85 %{l_prefix}/bin/python ./configure \
86 --prefix=%{l_prefix} \
87 --openssl-use-sys \
88 --openssl-includes=%{l_prefix}/include \
89 --openssl-libpath=%{l_prefix}/lib \
90 --shared-zlib \
91 --shared-zlib-includes=%{l_prefix}/include \
92 --shared-zlib-libpath=%{l_prefix}/lib \
93 --without-dtrace
94 %{l_make} %{l_mflags -O}
96 %install
97 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
98 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
99 %{l_shtool} mkdir -f -p -m 755 \
100 $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \
101 $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3
102 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
104 %files -f files
106 %clean