]>
Commit | Line | Data |
---|---|---|
210abff9 | 1 | Summary: Asynchronous JavaScript Engine |
2 | Name: nodejs | |
7372d27d | 3 | Version: 0.4.12 |
27cf5215 | 4 | Release: 2 |
210abff9 | 5 | License: BSD |
6 | Group: Libraries | |
7 | URL: http://nodejs.org/ | |
8 | Source0: http://nodejs.org/dist/node-v%{version}.tar.gz | |
7372d27d | 9 | # Source0-md5: a6375eaa43db5356bf443e25b828ae16 |
a3293030 | 10 | Patch0: %{name}-ev-multiplicity.patch |
fb6f511a | 11 | Patch1: %{name}-soname.patch |
a3293030 | 12 | BuildRequires: c-ares-devel |
13 | BuildRequires: c-ares-devel >= 1.7.4 | |
12a49d35 | 14 | BuildRequires: gcc >= 5:4.0 |
210abff9 | 15 | BuildRequires: libeio-devel |
a3293030 | 16 | BuildRequires: libev-devel >= 4.0.0 |
210abff9 | 17 | BuildRequires: libstdc++-devel |
18 | BuildRequires: python | |
12a49d35 | 19 | BuildRequires: rpm >= 4.4.9-56 |
2bc97491 | 20 | BuildRequires: v8-devel >= 3.1.5 |
210abff9 | 21 | ExclusiveArch: %{ix86} %{x8664} arm |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Node's goal is to provide an easy way to build scalable network | |
26 | programs. In the above example, the two second delay does not prevent | |
27 | the server from handling new requests. Node tells the operating system | |
28 | (through epoll, kqueue, /dev/poll, or select) that it should be | |
29 | notified when the 2 seconds are up or if a new connection is made -- | |
30 | then it goes to sleep. If someone new connects, then it executes the | |
31 | callback, if the timeout expires, it executes the inner callback. Each | |
32 | connection is only a small heap allocation. | |
33 | ||
210abff9 | 34 | %package devel |
12a49d35 | 35 | Summary: Development headers for nodejs |
210abff9 | 36 | Group: Development/Libraries |
a8f57a3f | 37 | Requires: %{name} = %{version}-%{release} |
210abff9 | 38 | |
39 | %description devel | |
12a49d35 | 40 | Development headers for nodejs. |
210abff9 | 41 | |
42 | %prep | |
43 | %setup -q -n node-v%{version} | |
a3293030 | 44 | %patch0 -p1 |
fb6f511a | 45 | %patch1 -p1 |
210abff9 | 46 | |
47 | %build | |
48 | # build library | |
210abff9 | 49 | CFLAGS="%{rpmcflags}" |
50 | CXXFLAGS="%{rpmcxxflags}" | |
51 | LDFLAGS="%{rpmcflags}" | |
52 | %if "%{pld_release}" == "ac" | |
8791ea86 ER |
53 | CC="%{__cc}4" |
54 | CXX="%{__cxx}4" | |
210abff9 | 55 | %else |
8791ea86 ER |
56 | CC="%{__cc}" |
57 | CXX="%{__cxx}" | |
210abff9 | 58 | %endif |
58494f0c | 59 | export CFLAGS LDFLAGS CXXFLAGS CC CXX |
210abff9 | 60 | |
7372d27d | 61 | export PYTHONPATH=tools |
8791ea86 | 62 | %{__python} tools/waf-light configure \ |
b52d635c | 63 | --shared-v8 \ |
64 | --shared-cares \ | |
65 | --shared-libev \ | |
a8f57a3f | 66 | --libdir=%{_libdir} \ |
210abff9 | 67 | --prefix=%{_prefix} |
68 | ||
8791ea86 | 69 | %{__python} tools/waf-light build \ |
7372d27d | 70 | --product-type='cshlib' |
71 | ||
72 | $CC -o build/default/node -Isrc src/node_main.cc -lnode -Lbuild/default | |
210abff9 | 73 | |
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
7372d27d | 76 | export PYTHONPATH=tools |
8791ea86 | 77 | %{__python} tools/waf-light install \ |
7372d27d | 78 | --product-type=cshlib \ |
79 | --destdir=$RPM_BUILD_ROOT | |
80 | ||
8791ea86 | 81 | install -p build/default/node $RPM_BUILD_ROOT%{_bindir}/node |
a752c1c0 | 82 | |
27cf5215 ER |
83 | chmod a+x $RPM_BUILD_ROOT%{_libdir}/*.so* |
84 | ||
210abff9 | 85 | %clean |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
7372d27d | 88 | %post -p /sbin/ldconfig |
89 | %postun -p /sbin/ldconfig | |
90 | ||
210abff9 | 91 | %files |
92 | %defattr(644,root,root,755) | |
93 | %doc AUTHORS ChangeLog LICENSE | |
94 | %attr(755,root,root) %{_bindir}/node | |
7372d27d | 95 | %attr(755,root,root) %{_libdir}/libnode.so.*.*.* |
8791ea86 ER |
96 | %ghost %{_libdir}/libnode.so.4 |
97 | %dir %{_libdir}/node | |
210abff9 | 98 | %{_mandir}/man1/node.1* |
99 | ||
210abff9 | 100 | %files devel |
101 | %defattr(644,root,root,755) | |
7372d27d | 102 | %{_libdir}/libnode.so |
58494f0c | 103 | %{_includedir}/node |
c6be74cc | 104 | %attr(755,root,root) %{_bindir}/node-waf |
afb1c7e5 PZ |
105 | %dir %{_libdir}/node/wafadmin |
106 | %dir %{_libdir}/node/wafadmin/Tools | |
107 | %{_libdir}/node/wafadmin/*.py | |
108 | %{_libdir}/node/wafadmin/Tools/*.py | |
8791ea86 | 109 | %{_pkgconfigdir}/nodejs.pc |