]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
- 0.1.98
[packages/nodejs.git] / nodejs.spec
1 # TODO:
2 # - use system waf
3
4 Summary:        Asynchronous JavaScript Engine
5 Name:           nodejs
6 Version:        0.1.98
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
12 # Source0-md5:  d8a75cb5c18ce20e0206ced95a8c1544
13 BuildRequires:  gcc >= 5:4.0
14 BuildRequires:  libeio-devel
15 BuildRequires:  libev-devel >= 3.90
16 BuildRequires:  libstdc++-devel
17 BuildRequires:  python
18 BuildRequires:  rpm >= 4.4.9-56
19 BuildRequires:  udns-devel
20 BuildRequires:  c-ares-devel >= 1.7.1-0.20100523.0
21 BuildRequires:  v8-devel >= 2.2.12
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
39 %description devel
40 Development headers for nodejs.
41
42 %prep
43 %setup -q -n node-v%{version}
44
45 %build
46 # build library
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 \
60         --shared-v8 \
61         --shared-cares \
62         --shared-libev \
63         --prefix=%{_prefix}
64
65 tools/waf-light build
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries}
70 tools/waf-light install \
71         --destdir=$RPM_BUILD_ROOT
72
73 cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
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
88 %files devel
89 %defattr(644,root,root,755)
90 %dir %{_includedir}/node
91 %{_includedir}/node/*.h
92 %attr(755,root,root) %{_bindir}/node-waf
93 %{_libdir}/node/wafadmin/
This page took 0.078827 seconds and 3 git commands to generate.