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