]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
- R: v8 >= 3.1.5
[packages/nodejs.git] / nodejs.spec
1
2 Summary:        Asynchronous JavaScript Engine
3 Name:           nodejs
4 Version:        0.4.0
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
10 # Source0-md5:  18f89256751f9b8e27dee8494f508171
11 Patch0:         %{name}-ev-multiplicity.patch
12 BuildRequires:  c-ares-devel
13 BuildRequires:  c-ares-devel >= 1.7.4
14 BuildRequires:  gcc >= 5:4.0
15 BuildRequires:  libeio-devel
16 BuildRequires:  libev-devel >= 4.0.0
17 BuildRequires:  libstdc++-devel
18 BuildRequires:  python
19 BuildRequires:  rpm >= 4.4.9-56
20 BuildRequires:  v8-devel >= 3.1.5
21 BuildRequires:  waf
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
35 %package devel
36 Summary:        Development headers for nodejs
37 Group:          Development/Libraries
38 Requires:       waf
39
40 %description devel
41 Development headers for nodejs.
42
43 %prep
44 %setup -q -n node-v%{version}
45 %patch0 -p1
46
47 %build
48 # build library
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
59 export CFLAGS LDFLAGS CXXFLAGS CC CXX
60
61 export PYTHONPATH=tools
62 %waf configure \
63         --shared-v8 \
64         --shared-cares \
65         --shared-libev \
66         --prefix=%{_prefix}
67
68 %waf build
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries,%{_libdir}/waf/wafadmin/Tools}
73
74 export PYTHONPATH=tools
75 %waf install \
76         --destdir=$RPM_BUILD_ROOT
77
78 cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries
79 cp tools/wafadmin/Tools/node_addon.py $RPM_BUILD_ROOT%{_libdir}/waf/wafadmin/Tools
80
81 rm $RPM_BUILD_ROOT%{_bindir}/node-waf
82 # ? really required?
83 ln -s waf $RPM_BUILD_ROOT%{_bindir}/node-waf
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc AUTHORS ChangeLog LICENSE
91 %attr(755,root,root) %{_bindir}/node
92 %dir %{_libdir}/node
93 %dir %{_libdir}/node/libraries
94 %{_libdir}/node/libraries/*.js
95 %{_mandir}/man1/node.1*
96
97 %files devel
98 %defattr(644,root,root,755)
99 %{_includedir}/node
100 %attr(755,root,root) %{_bindir}/node-waf
101 %{_libdir}/waf/wafadmin/Tools/node_addon.py
102 /usr/lib/pkgconfig/nodejs.pc
This page took 0.028854 seconds and 3 git commands to generate.