]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
- 0.1.97
[packages/nodejs.git] / nodejs.spec
1 # TODO:
2 # - use system waf
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
11 Summary:        Asynchronous JavaScript Engine
12 Name:           nodejs
13 Version:        0.1.97
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
19 # Source0-md5:  4e80b775f9417cc8305fdec34646d8fb
20 BuildRequires:  gcc >= 5:4.0
21 BuildRequires:  libeio-devel
22 BuildRequires:  libev-devel >= 3.90
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  python
25 BuildRequires:  rpm >= 4.4.9-56
26 BuildRequires:  udns-devel
27 BuildRequires:  c-ares-devel >= 1.7.1-0.20100523.0
28 BuildRequires:  v8-devel >= 2.2.12
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
42 %package devel
43 Summary:        Development headers for nodejs
44 Group:          Development/Libraries
45
46 %description devel
47 Development headers for nodejs.
48
49 %prep
50 %setup -q -n node-v%{version}
51
52 %build
53 # build library
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 \
67         --system \
68         --prefix=%{_prefix}
69
70 tools/waf-light build
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries}
75 tools/waf-light install \
76         --destdir=$RPM_BUILD_ROOT
77
78 cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
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
93 %files devel
94 %defattr(644,root,root,755)
95 %dir %{_includedir}/node
96 %{_includedir}/node/*.h
97 %attr(755,root,root) %{_bindir}/node-waf
98 %{_libdir}/node/wafadmin/
This page took 0.071666 seconds and 4 git commands to generate.