node/node.spec

Mon, 15 Oct 2012 21:25:50 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 15 Oct 2012 21:25:50 +0200
changeset 743
51daf2b49ad7
parent 742
36814bf43709
permissions
-rw-r--r--

Back out change 742 as unversioned Google projects prove too unreliable
for production use, and rather correct problems with the OpenPKG v8
installation and leverage that instead.

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@743 44 BuildPreReq: openssl, libexecinfo, v8, zlib, python, pkgconfig
michael@743 45 PreReq: openssl, libexecinfo, v8, zlib
michael@741 46
michael@741 47 %description
michael@741 48 Node.js provides an easy way to build scalable network servers in
michael@743 49 JavaScript. It is an event driven I/O environment based on Google
michael@743 50 V8 JavaScript virtual machine.
michael@741 51
michael@741 52 %track
michael@741 53 prog node = {
michael@741 54 version = %{version}
michael@741 55 url = http://nodejs.org/
michael@741 56 regex = node-v(__VER__)\.tar\.gz
michael@741 57 }
michael@741 58
michael@741 59 %prep
michael@741 60 %setup -q -n node-v%{version}
michael@741 61 %patch -p0
michael@741 62
michael@741 63 %build
michael@741 64 %{l_shtool} subst \
michael@741 65 -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \
michael@741 66 deps/npm/cli.js \
michael@741 67 deps/npm/bin/npm-cli.js \
michael@741 68 deps/npm/scripts/index-build.js \
michael@741 69 deps/npm/node_modules/semver/bin/semver \
michael@741 70 deps/npm/node_modules/which/bin/which \
michael@741 71 deps/npm/node_modules/nopt/bin/nopt.js
michael@741 72 libs="-lexecinfo"
michael@741 73 case "%{l_platform -t} " in
michael@741 74 *-linux* ) libs="$libs -ldl" ;;
michael@741 75 esac
michael@741 76 CC="%{l_cc}" \
michael@741 77 CXX="%{l_cxx}" \
michael@741 78 CFLAGS="%{l_cflags -O}" \
michael@741 79 CXXFLAGS="%{l_cxxflags -O}" \
michael@741 80 CPPFLAGS="%{l_cppflags}" \
michael@741 81 LDFLAGS="%{l_ldflags}" \
michael@741 82 LIBS="$libs" \
michael@741 83 %{l_prefix}/bin/python ./configure \
michael@741 84 --prefix=%{l_prefix} \
michael@741 85 --openssl-use-sys \
michael@741 86 --openssl-includes=%{l_prefix}/include \
michael@741 87 --openssl-libpath=%{l_prefix}/lib \
michael@743 88 --shared-v8 \
michael@743 89 --shared-v8-includes=%{l_prefix}/include \
michael@743 90 --shared-v8-libpath=%{l_prefix}/lib \
michael@743 91 --shared-v8-libname=v8 \
michael@741 92 --shared-zlib \
michael@741 93 --shared-zlib-includes=%{l_prefix}/include \
michael@742 94 --shared-zlib-libpath=%{l_prefix}/lib \
michael@742 95 --without-dtrace
michael@741 96 %{l_make} %{l_mflags -O}
michael@741 97
michael@741 98 %install
michael@741 99 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
michael@741 100 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@741 101 %{l_shtool} mkdir -f -p -m 755 \
michael@741 102 $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \
michael@741 103 $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3
michael@741 104 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@741 105
michael@741 106 %files -f files
michael@741 107
michael@741 108 %clean
michael@741 109

mercurial