michael@741: ## michael@741: ## node.spec -- OpenPKG RPM Package Specification michael@741: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@741: ## michael@741: ## Permission to use, copy, modify, and distribute this software for michael@741: ## any purpose with or without fee is hereby granted, provided that michael@741: ## the above copyright notice and this permission notice appear in all michael@741: ## copies. michael@741: ## michael@741: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@741: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@741: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@741: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@741: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@741: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@741: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@741: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@741: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@741: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@741: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@741: ## SUCH DAMAGE. michael@741: ## michael@741: michael@741: # package information michael@741: Name: node michael@741: Summary: Node JavaScript Server michael@741: URL: http://nodejs.org/ michael@741: Vendor: Joyent, Inc. michael@741: Packager: OpenPKG Foundation e.V. michael@741: Distribution: OpenPKG Community michael@741: Class: EVAL michael@741: Group: Web michael@741: License: MIT/BSD michael@742: Version: 0.8.12 michael@742: Release: 20120800 michael@741: michael@741: # list of sources michael@741: Source0: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz michael@741: Patch0: node.patch michael@741: michael@741: # build information michael@742: BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes michael@741: PreReq: OpenPKG, openpkg >= 20100101 michael@742: BuildPreReq: openssl, libexecinfo, zlib, python, pkgconfig michael@742: PreReq: openssl, libexecinfo, zlib michael@741: michael@741: %description michael@741: Node.js provides an easy way to build scalable network servers in michael@742: JavaScript. It is an event driven I/O environment based on Google V8 michael@742: JavaScript virtual machine. This particular Node JS installation uses michael@742: a locally provided implementation of V8 rather than depending on an michael@742: externally available V8 installation. michael@741: michael@741: %track michael@741: prog node = { michael@741: version = %{version} michael@741: url = http://nodejs.org/ michael@741: regex = node-v(__VER__)\.tar\.gz michael@741: } michael@741: michael@741: %prep michael@741: %setup -q -n node-v%{version} michael@741: %patch -p0 michael@741: michael@741: %build michael@741: %{l_shtool} subst \ michael@741: -e 's;/usr/bin/env node;%{l_prefix}/bin/node;g' \ michael@741: deps/npm/cli.js \ michael@741: deps/npm/bin/npm-cli.js \ michael@741: deps/npm/scripts/index-build.js \ michael@741: deps/npm/node_modules/semver/bin/semver \ michael@741: deps/npm/node_modules/which/bin/which \ michael@741: deps/npm/node_modules/nopt/bin/nopt.js michael@741: libs="-lexecinfo" michael@741: case "%{l_platform -t} " in michael@741: *-linux* ) libs="$libs -ldl" ;; michael@741: esac michael@741: CC="%{l_cc}" \ michael@741: CXX="%{l_cxx}" \ michael@741: CFLAGS="%{l_cflags -O}" \ michael@741: CXXFLAGS="%{l_cxxflags -O}" \ michael@741: CPPFLAGS="%{l_cppflags}" \ michael@741: LDFLAGS="%{l_ldflags}" \ michael@741: LIBS="$libs" \ michael@741: %{l_prefix}/bin/python ./configure \ michael@741: --prefix=%{l_prefix} \ michael@741: --openssl-use-sys \ michael@741: --openssl-includes=%{l_prefix}/include \ michael@741: --openssl-libpath=%{l_prefix}/lib \ michael@741: --shared-zlib \ michael@741: --shared-zlib-includes=%{l_prefix}/include \ michael@742: --shared-zlib-libpath=%{l_prefix}/lib \ michael@742: --without-dtrace michael@741: %{l_make} %{l_mflags -O} michael@741: michael@741: %install michael@741: %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT michael@741: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@741: %{l_shtool} mkdir -f -p -m 755 \ michael@741: $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man1 \ michael@741: $RPM_BUILD_ROOT%{l_prefix}/lib/node_modules/npm/man/man3 michael@741: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@741: michael@741: %files -f files michael@741: michael@741: %clean michael@741: