]>
Commit | Line | Data |
---|---|---|
210abff9 | 1 | |
210abff9 | 2 | Summary: Asynchronous JavaScript Engine |
3 | Name: nodejs | |
a752c1c0 | 4 | Version: 0.1.100 |
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 | |
a752c1c0 | 10 | # Source0-md5: f8567739b71d05b8edcae1916d7e80cb |
6505a74e | 11 | BuildRequires: c-ares-devel >= 1.7.1-0.20100523.0 |
12a49d35 | 12 | BuildRequires: gcc >= 5:4.0 |
210abff9 | 13 | BuildRequires: libeio-devel |
14 | BuildRequires: libev-devel >= 3.90 | |
15 | BuildRequires: libstdc++-devel | |
16 | BuildRequires: python | |
12a49d35 | 17 | BuildRequires: rpm >= 4.4.9-56 |
210abff9 | 18 | BuildRequires: udns-devel |
a752c1c0 | 19 | BuildRequires: v8-devel >= 2.2.21 |
20 | BuildRequires: waf | |
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 |
a752c1c0 | 37 | Requires: waf |
210abff9 | 38 | |
39 | %description devel | |
12a49d35 | 40 | Development headers for nodejs. |
210abff9 | 41 | |
42 | %prep | |
43 | %setup -q -n node-v%{version} | |
210abff9 | 44 | |
45 | %build | |
46 | # build library | |
210abff9 | 47 | CFLAGS="%{rpmcflags}" |
48 | CXXFLAGS="%{rpmcxxflags}" | |
49 | LDFLAGS="%{rpmcflags}" | |
50 | %if "%{pld_release}" == "ac" | |
51 | CC=%{__cc}4 | |
52 | CXX=%{__cxx}4 | |
53 | %else | |
54 | CC=%{__cc} | |
55 | CXX=%{__cxx} | |
56 | %endif | |
a752c1c0 | 57 | PYTHONPATH=tools |
58 | export CFLAGS LDFLAGS CXXFLAGS CC CXX PYTHONPATH | |
210abff9 | 59 | |
a752c1c0 | 60 | waf configure \ |
b52d635c | 61 | --shared-v8 \ |
62 | --shared-cares \ | |
63 | --shared-libev \ | |
210abff9 | 64 | --prefix=%{_prefix} |
65 | ||
a752c1c0 | 66 | waf build |
210abff9 | 67 | |
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
6505a74e | 70 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries,%{_libdir}/waf/wafadmin/Tools} |
a752c1c0 | 71 | |
72 | PYTHONPATH=tools | |
73 | export PYTHONPATH | |
74 | ||
75 | waf install \ | |
210abff9 | 76 | --destdir=$RPM_BUILD_ROOT |
77 | ||
e550379f | 78 | cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries |
c6be74cc | 79 | |
6505a74e | 80 | cp tools/wafadmin/Tools/node_addon.py $RPM_BUILD_ROOT%{_libdir}/waf/wafadmin/Tools/ |
81 | ||
a752c1c0 | 82 | rm $RPM_BUILD_ROOT%{_bindir}/node-waf |
83 | ln -s %{_bindir}/waf $RPM_BUILD_ROOT%{_bindir}/node-waf | |
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 | |
92 | %attr(755,root,root) %{_bindir}/node-repl | |
93 | %dir %{_libdir}/node | |
94 | %dir %{_libdir}/node/libraries | |
95 | %{_libdir}/node/libraries/*.js | |
96 | %{_mandir}/man1/node.1* | |
97 | ||
210abff9 | 98 | %files devel |
99 | %defattr(644,root,root,755) | |
12a49d35 | 100 | %dir %{_includedir}/node |
c6be74cc | 101 | %{_includedir}/node/*.h |
102 | %attr(755,root,root) %{_bindir}/node-waf | |
6505a74e | 103 | %{_libdir}/waf/wafadmin/Tools/node_addon.py |