]>
Commit | Line | Data |
---|---|---|
12a49d35 ER |
1 | # TODO: |
2 | # - use system waf | |
210abff9 | 3 | |
4 | # For the 1.2 branch, we use 0s here | |
5 | # For 1.3+, we use the three digit versions | |
6 | %define somajor 2 | |
7 | %define sominor 1 | |
8 | %define sobuild 2 | |
9 | %define sover %{somajor}.%{sominor}.%{sobuild} | |
10 | ||
210abff9 | 11 | Summary: Asynchronous JavaScript Engine |
12 | Name: nodejs | |
1abe508f | 13 | Version: 0.1.97 |
210abff9 | 14 | Release: 0 |
15 | License: BSD | |
16 | Group: Libraries | |
17 | URL: http://nodejs.org/ | |
18 | Source0: http://nodejs.org/dist/node-v%{version}.tar.gz | |
1abe508f | 19 | # Source0-md5: 4e80b775f9417cc8305fdec34646d8fb |
12a49d35 | 20 | BuildRequires: gcc >= 5:4.0 |
210abff9 | 21 | BuildRequires: libeio-devel |
22 | BuildRequires: libev-devel >= 3.90 | |
23 | BuildRequires: libstdc++-devel | |
24 | BuildRequires: python | |
12a49d35 | 25 | BuildRequires: rpm >= 4.4.9-56 |
210abff9 | 26 | BuildRequires: udns-devel |
08fd0f57 | 27 | BuildRequires: c-ares-devel >= 1.7.1-0.20100523.0 |
1abe508f | 28 | BuildRequires: v8-devel >= 2.2.12 |
210abff9 | 29 | ExclusiveArch: %{ix86} %{x8664} arm |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | Node's goal is to provide an easy way to build scalable network | |
34 | programs. In the above example, the two second delay does not prevent | |
35 | the server from handling new requests. Node tells the operating system | |
36 | (through epoll, kqueue, /dev/poll, or select) that it should be | |
37 | notified when the 2 seconds are up or if a new connection is made -- | |
38 | then it goes to sleep. If someone new connects, then it executes the | |
39 | callback, if the timeout expires, it executes the inner callback. Each | |
40 | connection is only a small heap allocation. | |
41 | ||
210abff9 | 42 | %package devel |
12a49d35 | 43 | Summary: Development headers for nodejs |
210abff9 | 44 | Group: Development/Libraries |
210abff9 | 45 | |
46 | %description devel | |
12a49d35 | 47 | Development headers for nodejs. |
210abff9 | 48 | |
49 | %prep | |
50 | %setup -q -n node-v%{version} | |
210abff9 | 51 | |
52 | %build | |
53 | # build library | |
210abff9 | 54 | CFLAGS="%{rpmcflags}" |
55 | CXXFLAGS="%{rpmcxxflags}" | |
56 | LDFLAGS="%{rpmcflags}" | |
57 | %if "%{pld_release}" == "ac" | |
58 | CC=%{__cc}4 | |
59 | CXX=%{__cxx}4 | |
60 | %else | |
61 | CC=%{__cc} | |
62 | CXX=%{__cxx} | |
63 | %endif | |
64 | export CFLAGS LDFLAGS CXXFLAGS CC CXX | |
65 | ||
66 | tools/waf-light configure \ | |
c6be74cc | 67 | --system \ |
210abff9 | 68 | --prefix=%{_prefix} |
69 | ||
70 | tools/waf-light build | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
c6be74cc | 74 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries} |
210abff9 | 75 | tools/waf-light install \ |
76 | --destdir=$RPM_BUILD_ROOT | |
77 | ||
e550379f | 78 | cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries |
c6be74cc | 79 | |
210abff9 | 80 | %clean |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | ||
210abff9 | 83 | %files |
84 | %defattr(644,root,root,755) | |
85 | %doc AUTHORS ChangeLog LICENSE | |
86 | %attr(755,root,root) %{_bindir}/node | |
87 | %attr(755,root,root) %{_bindir}/node-repl | |
88 | %dir %{_libdir}/node | |
89 | %dir %{_libdir}/node/libraries | |
90 | %{_libdir}/node/libraries/*.js | |
91 | %{_mandir}/man1/node.1* | |
92 | ||
210abff9 | 93 | %files devel |
94 | %defattr(644,root,root,755) | |
12a49d35 | 95 | %dir %{_includedir}/node |
c6be74cc | 96 | %{_includedir}/node/*.h |
97 | %attr(755,root,root) %{_bindir}/node-waf | |
98 | %{_libdir}/node/wafadmin/ |