1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/node/node.spec Mon Oct 15 21:20:29 2012 +0200 1.3 @@ -0,0 +1,108 @@ 1.4 +## 1.5 +## node.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package information 1.28 +Name: node 1.29 +Summary: Node JavaScript Server 1.30 +URL: http://nodejs.org/ 1.31 +Vendor: Joyent, Inc. 1.32 +Packager: OpenPKG Foundation e.V. 1.33 +Distribution: OpenPKG Community 1.34 +Class: EVAL 1.35 +Group: Web 1.36 +License: MIT/BSD 1.37 +Version: 0.8.11 1.38 +Release: 20121006 1.39 + 1.40 +# list of sources 1.41 +Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz 1.42 +Patch0: node.patch 1.43 + 1.44 +# build information 1.45 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, python 1.46 +PreReq: OpenPKG, openpkg >= 20100101 1.47 +BuildPreReq: openssl, libexecinfo, v8, zlib 1.48 +PreReq: openssl, libexecinfo, v8, zlib 1.49 + 1.50 +%description 1.51 + Node.js provides an easy way to build scalable network servers in 1.52 + JavaScript. It is an event-driven I/O environment based on Google V8 1.53 + JavaScript virtual machine. 1.54 + 1.55 +%track 1.56 + prog node = { 1.57 + version = %{version} 1.58 + url = http://nodejs.org/ 1.59 + regex = node-v(__VER__)\.tar\.gz 1.60 + } 1.61 + 1.62 +%prep 1.63 + %setup -q -n node-v%{version} 1.64 + %patch -p0 1.65 + 1.66 +%build 1.67 + %{l_shtool} subst \ 1.68 + -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \ 1.69 + deps/npm/cli.js \ 1.70 + deps/npm/bin/npm-cli.js \ 1.71 + deps/npm/scripts/index-build.js \ 1.72 + deps/npm/node_modules/semver/bin/semver \ 1.73 + deps/npm/node_modules/which/bin/which \ 1.74 + deps/npm/node_modules/nopt/bin/nopt.js 1.75 + libs="-lexecinfo" 1.76 + case "%{l_platform -t} " in 1.77 + *-linux* ) libs="$libs -ldl" ;; 1.78 + esac 1.79 + CC="%{l_cc}" \ 1.80 + CXX="%{l_cxx}" \ 1.81 + CFLAGS="%{l_cflags -O}" \ 1.82 + CXXFLAGS="%{l_cxxflags -O}" \ 1.83 + CPPFLAGS="%{l_cppflags}" \ 1.84 + LDFLAGS="%{l_ldflags}" \ 1.85 + LIBS="$libs" \ 1.86 + %{l_prefix}/bin/python ./configure \ 1.87 + --prefix=%{l_prefix} \ 1.88 + --openssl-use-sys \ 1.89 + --openssl-includes=%{l_prefix}/include \ 1.90 + --openssl-libpath=%{l_prefix}/lib \ 1.91 + --shared-v8 \ 1.92 + --shared-v8-includes=%{l_prefix}/include \ 1.93 + --shared-v8-libpath=%{l_prefix}/lib \ 1.94 + --shared-v8-libname=v8 \ 1.95 + --shared-zlib \ 1.96 + --shared-zlib-includes=%{l_prefix}/include \ 1.97 + --shared-zlib-libpath=%{l_prefix}/lib 1.98 + %{l_make} %{l_mflags -O} 1.99 + 1.100 +%install 1.101 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.102 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.103 + %{l_shtool} mkdir -f -p -m 755 \ 1.104 + $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \ 1.105 + $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3 1.106 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} 1.107 + 1.108 +%files -f files 1.109 + 1.110 +%clean 1.111 +