]> git.pld-linux.org Git - packages/nodejs.git/blobdiff - nodejs.spec
noarch doc subpackage
[packages/nodejs.git] / nodejs.spec
index c28a22a0eed0f808fb0652b26d157c0dda538dc3..fd82da05c8769fe1a64961a7e0c6cd9b9219619f 100644 (file)
@@ -1,11 +1,18 @@
+#
+# Conditional build:
+%bcond_without system_v8       # system v8
+
+# NOTES:
+# - https://nodejs.org/en/download/releases/
+
 Summary:       Asynchronous JavaScript Engine
 Name:          nodejs
-Version:       0.10.30
-Release:       1
+Version:       0.10.40
+Release:       0.1
 License:       BSD and MIT and Apache v2.0 and GPL v3
 Group:         Development/Languages
-Source0:       http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
-# Source0-md5: bae597a31bf6d23da1c4217bfed611dc
+Source0:       https://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
+# Source0-md5: f6ef20f327ecd6cb1586c41c7184290c
 Patch1:                %{name}-shared.patch
 # force node to use /usr/lib/node as the systemwide module directory
 Patch2:                %{name}-libpath.patch
@@ -19,7 +26,7 @@ Patch5:               uv-fpic.patch
 # http://blog.nodejs.org/2014/06/16/openssl-and-breaking-utf-8-change/
 Patch6:                %{name}-revert-utf8-v8.patch
 Patch7:                %{name}-revert-utf8-node.patch
-URL:           http://www.nodejs.org/
+URL:           https://nodejs.org/
 BuildRequires: c-ares-devel
 BuildRequires: gcc >= 5:4.0
 BuildRequires: http-parser-devel >= 2.0
@@ -32,7 +39,7 @@ BuildRequires:        python-jsmin
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.219
 BuildRequires: sed >= 4.0
-BuildRequires: v8-devel >= 3.15.11.10
+%{?with_system_v8:BuildRequires:       v8-devel >= 3.15.11.10}
 BuildRequires: zlib-devel
 Requires:      ca-certificates
 Obsoletes:     nodejs-waf
@@ -58,7 +65,7 @@ Requires:     http-parser-devel
 Requires:      libstdc++-devel
 Requires:      libuv-devel
 Requires:      openssl-devel
-Requires:      v8-devel
+%{?with_system_v8:Requires:    v8-devel}
 Requires:      zlib-devel
 
 %description devel
@@ -67,6 +74,9 @@ Development headers for nodejs.
 %package doc
 Summary:       Evented I/O for V8 JavaScript - documentation
 Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description doc
 Node.js is a server-side JavaScript environment that uses an
@@ -90,7 +100,13 @@ This package contains the documentation for nodejs.
 
 grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python,#!%{__python},'
 
-rm -r deps
+rm -r deps/npm
+rm -r deps/cares
+rm -r deps/http_parser
+rm -r deps/openssl
+rm -r deps/uv
+%{?with_system_v8:rm -r deps/v8}
+rm -r deps/zlib
 
 %build
 # CC used only to detect if CC is clang, not used for compiling
@@ -98,7 +114,7 @@ CC="%{__cc}" \
 CXX="%{__cxx}" \
 GYP_DEFINES="soname_version=%{sover}" \
 ./configure \
-       --shared-v8 \
+       %{?with_system_v8:--shared-v8} \
        --shared-zlib \
        --shared-openssl \
        --shared-cares \
This page took 0.078497 seconds and 4 git commands to generate.