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