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