]>
Commit | Line | Data |
---|---|---|
12a49d35 ER |
1 | # TODO: |
2 | # - use system waf | |
210abff9 | 3 | |
210abff9 | 4 | Summary: Asynchronous JavaScript Engine |
5 | Name: nodejs | |
b52d635c | 6 | Version: 0.1.98 |
210abff9 | 7 | Release: 0 |
8 | License: BSD | |
9 | Group: Libraries | |
10 | URL: http://nodejs.org/ | |
11 | Source0: http://nodejs.org/dist/node-v%{version}.tar.gz | |
b52d635c | 12 | # Source0-md5: d8a75cb5c18ce20e0206ced95a8c1544 |
12a49d35 | 13 | BuildRequires: gcc >= 5:4.0 |
210abff9 | 14 | BuildRequires: libeio-devel |
15 | BuildRequires: libev-devel >= 3.90 | |
16 | BuildRequires: libstdc++-devel | |
17 | BuildRequires: python | |
12a49d35 | 18 | BuildRequires: rpm >= 4.4.9-56 |
210abff9 | 19 | BuildRequires: udns-devel |
08fd0f57 | 20 | BuildRequires: c-ares-devel >= 1.7.1-0.20100523.0 |
1abe508f | 21 | BuildRequires: v8-devel >= 2.2.12 |
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 |
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 | |
57 | export CFLAGS LDFLAGS CXXFLAGS CC CXX | |
58 | ||
59 | tools/waf-light configure \ | |
b52d635c | 60 | --shared-v8 \ |
61 | --shared-cares \ | |
62 | --shared-libev \ | |
210abff9 | 63 | --prefix=%{_prefix} |
64 | ||
65 | tools/waf-light build | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
c6be74cc | 69 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries} |
210abff9 | 70 | tools/waf-light install \ |
71 | --destdir=$RPM_BUILD_ROOT | |
72 | ||
e550379f | 73 | cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries |
c6be74cc | 74 | |
210abff9 | 75 | %clean |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
210abff9 | 78 | %files |
79 | %defattr(644,root,root,755) | |
80 | %doc AUTHORS ChangeLog LICENSE | |
81 | %attr(755,root,root) %{_bindir}/node | |
82 | %attr(755,root,root) %{_bindir}/node-repl | |
83 | %dir %{_libdir}/node | |
84 | %dir %{_libdir}/node/libraries | |
85 | %{_libdir}/node/libraries/*.js | |
86 | %{_mandir}/man1/node.1* | |
87 | ||
210abff9 | 88 | %files devel |
89 | %defattr(644,root,root,755) | |
12a49d35 | 90 | %dir %{_includedir}/node |
c6be74cc | 91 | %{_includedir}/node/*.h |
92 | %attr(755,root,root) %{_bindir}/node-waf | |
93 | %{_libdir}/node/wafadmin/ |