]>
Commit | Line | Data |
---|---|---|
210abff9 | 1 | |
210abff9 | 2 | Summary: Asynchronous JavaScript Engine |
3 | Name: nodejs | |
5e9fa89b | 4 | Version: 0.4.1 |
210abff9 | 5 | Release: 0 |
6 | License: BSD | |
7 | Group: Libraries | |
8 | URL: http://nodejs.org/ | |
9 | Source0: http://nodejs.org/dist/node-v%{version}.tar.gz | |
5e9fa89b | 10 | # Source0-md5: 9566bdbd05c18cc2bbe1fa0fba60dd0a |
a3293030 | 11 | Patch0: %{name}-ev-multiplicity.patch |
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 |
a752c1c0 | 21 | BuildRequires: waf |
210abff9 | 22 | ExclusiveArch: %{ix86} %{x8664} arm |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | Node's goal is to provide an easy way to build scalable network | |
27 | programs. In the above example, the two second delay does not prevent | |
28 | the server from handling new requests. Node tells the operating system | |
29 | (through epoll, kqueue, /dev/poll, or select) that it should be | |
30 | notified when the 2 seconds are up or if a new connection is made -- | |
31 | then it goes to sleep. If someone new connects, then it executes the | |
32 | callback, if the timeout expires, it executes the inner callback. Each | |
33 | connection is only a small heap allocation. | |
34 | ||
210abff9 | 35 | %package devel |
12a49d35 | 36 | Summary: Development headers for nodejs |
210abff9 | 37 | Group: Development/Libraries |
a752c1c0 | 38 | Requires: waf |
210abff9 | 39 | |
40 | %description devel | |
12a49d35 | 41 | Development headers for nodejs. |
210abff9 | 42 | |
43 | %prep | |
44 | %setup -q -n node-v%{version} | |
a3293030 | 45 | %patch0 -p1 |
210abff9 | 46 | |
47 | %build | |
48 | # build library | |
210abff9 | 49 | CFLAGS="%{rpmcflags}" |
50 | CXXFLAGS="%{rpmcxxflags}" | |
51 | LDFLAGS="%{rpmcflags}" | |
52 | %if "%{pld_release}" == "ac" | |
53 | CC=%{__cc}4 | |
54 | CXX=%{__cxx}4 | |
55 | %else | |
56 | CC=%{__cc} | |
57 | CXX=%{__cxx} | |
58 | %endif | |
58494f0c | 59 | export CFLAGS LDFLAGS CXXFLAGS CC CXX |
210abff9 | 60 | |
58494f0c ER |
61 | export PYTHONPATH=tools |
62 | %waf configure \ | |
b52d635c | 63 | --shared-v8 \ |
64 | --shared-cares \ | |
65 | --shared-libev \ | |
210abff9 | 66 | --prefix=%{_prefix} |
67 | ||
58494f0c | 68 | %waf build |
210abff9 | 69 | |
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
6505a74e | 72 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries,%{_libdir}/waf/wafadmin/Tools} |
a752c1c0 | 73 | |
58494f0c ER |
74 | export PYTHONPATH=tools |
75 | %waf install \ | |
210abff9 | 76 | --destdir=$RPM_BUILD_ROOT |
77 | ||
e550379f | 78 | cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries |
58494f0c | 79 | cp tools/wafadmin/Tools/node_addon.py $RPM_BUILD_ROOT%{_libdir}/waf/wafadmin/Tools |
6505a74e | 80 | |
a752c1c0 | 81 | rm $RPM_BUILD_ROOT%{_bindir}/node-waf |
58494f0c ER |
82 | # ? really required? |
83 | ln -s waf $RPM_BUILD_ROOT%{_bindir}/node-waf | |
a752c1c0 | 84 | |
210abff9 | 85 | %clean |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
210abff9 | 88 | %files |
89 | %defattr(644,root,root,755) | |
90 | %doc AUTHORS ChangeLog LICENSE | |
91 | %attr(755,root,root) %{_bindir}/node | |
210abff9 | 92 | %dir %{_libdir}/node |
93 | %dir %{_libdir}/node/libraries | |
94 | %{_libdir}/node/libraries/*.js | |
95 | %{_mandir}/man1/node.1* | |
96 | ||
210abff9 | 97 | %files devel |
98 | %defattr(644,root,root,755) | |
58494f0c | 99 | %{_includedir}/node |
c6be74cc | 100 | %attr(755,root,root) %{_bindir}/node-waf |
6505a74e | 101 | %{_libdir}/waf/wafadmin/Tools/node_addon.py |
a3293030 | 102 | /usr/lib/pkgconfig/nodejs.pc |