]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
- 0.4.3
[packages/nodejs.git] / nodejs.spec
1
2 Summary:        Asynchronous JavaScript Engine
3 Name:           nodejs
4 Version:        0.4.3
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:  a2a6a6699e275a30f6047b1f33281a77
11 Patch0:         %{name}-ev-multiplicity.patch
12 Patch1:         %{name}-soname.patch
13 BuildRequires:  c-ares-devel
14 BuildRequires:  c-ares-devel >= 1.7.4
15 BuildRequires:  gcc >= 5:4.0
16 BuildRequires:  libeio-devel
17 BuildRequires:  libev-devel >= 4.0.0
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  python
20 BuildRequires:  rpm >= 4.4.9-56
21 BuildRequires:  v8-devel >= 3.1.5
22 BuildRequires:  waf
23 ExclusiveArch:  %{ix86} %{x8664} arm
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define _plainlibdir %{_prefix}/lib
27
28 %description
29 Node's goal is to provide an easy way to build scalable network
30 programs. In the above example, the two second delay does not prevent
31 the server from handling new requests. Node tells the operating system
32 (through epoll, kqueue, /dev/poll, or select) that it should be
33 notified when the 2 seconds are up or if a new connection is made --
34 then it goes to sleep. If someone new connects, then it executes the
35 callback, if the timeout expires, it executes the inner callback. Each
36 connection is only a small heap allocation.
37
38 %package devel
39 Summary:        Development headers for nodejs
40 Group:          Development/Libraries
41 Requires:       waf
42 Requires:       %{name} = %{version}-%{release}
43
44 %description devel
45 Development headers for nodejs.
46
47 %prep
48 %setup -q -n node-v%{version}
49 %patch0 -p1
50 %patch1 -p1
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 export PYTHONPATH=tools
67 %waf configure \
68         --shared-v8 \
69         --shared-cares \
70         --shared-libev \
71         --libdir=%{_libdir} \
72         --prefix=%{_prefix}
73
74 %waf build \
75         --product-type=cshlib
76
77 $CC -o node -Isrc src/node_main.cc -lnode -Lbuild/default
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}/node/libraries,%{_plainlibdir}/waf/wafadmin/Tools}
82
83 export PYTHONPATH=tools
84 %waf install \
85         --product-type=cshlib \
86         --destdir=$RPM_BUILD_ROOT
87
88 install node $RPM_BUILD_ROOT%{_bindir}/node
89
90 cp -a lib/*.js $RPM_BUILD_ROOT%{_libdir}/node/libraries
91 cp tools/wafadmin/Tools/node_addon.py $RPM_BUILD_ROOT%{_plainlibdir}/waf/wafadmin/Tools
92
93 rm $RPM_BUILD_ROOT%{_bindir}/node-waf
94 # ? really required?
95 ln -s waf $RPM_BUILD_ROOT%{_bindir}/node-waf
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %post   -p /sbin/ldconfig
101 %postun -p /sbin/ldconfig
102
103 %files
104 %defattr(644,root,root,755)
105 %doc AUTHORS ChangeLog LICENSE
106 %attr(755,root,root) %{_bindir}/node
107 %dir %{_libdir}/node
108 %attr(755,root,root) %{_libdir}/libnode.so.*.*.*
109 %dir %{_libdir}/node/libraries
110 %{_libdir}/node/libraries/*.js
111 %{_mandir}/man1/node.1*
112
113 %files devel
114 %defattr(644,root,root,755)
115 %{_includedir}/node
116 %attr(755,root,root) %{_bindir}/node-waf
117 %{_libdir}/libnode.so
118 %{_plainlibdir}/waf/wafadmin/Tools/node_addon.py
119 %{_libdir}/pkgconfig/nodejs.pc
This page took 0.263334 seconds and 4 git commands to generate.