]> git.pld-linux.org Git - packages/nodejs.git/blob - nodejs.spec
- quote cc, ghost soname symlink
[packages/nodejs.git] / nodejs.spec
1 Summary:        Asynchronous JavaScript Engine
2 Name:           nodejs
3 Version:        0.4.12
4 Release:        1
5 License:        BSD
6 Group:          Libraries
7 URL:            http://nodejs.org/
8 Source0:        http://nodejs.org/dist/node-v%{version}.tar.gz
9 # Source0-md5:  a6375eaa43db5356bf443e25b828ae16
10 Patch0:         %{name}-ev-multiplicity.patch
11 Patch1:         %{name}-soname.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 ExclusiveArch:  %{ix86} %{x8664} arm
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Node's goal is to provide an easy way to build scalable network
26 programs. In the above example, the two second delay does not prevent
27 the server from handling new requests. Node tells the operating system
28 (through epoll, kqueue, /dev/poll, or select) that it should be
29 notified when the 2 seconds are up or if a new connection is made --
30 then it goes to sleep. If someone new connects, then it executes the
31 callback, if the timeout expires, it executes the inner callback. Each
32 connection is only a small heap allocation.
33
34 %package devel
35 Summary:        Development headers for nodejs
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38
39 %description devel
40 Development headers for nodejs.
41
42 %prep
43 %setup -q -n node-v%{version}
44 %patch0 -p1
45 %patch1 -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 %{__python} tools/waf-light configure \
63         --shared-v8 \
64         --shared-cares \
65         --shared-libev \
66         --libdir=%{_libdir} \
67         --prefix=%{_prefix}
68
69 %{__python} tools/waf-light build \
70         --product-type='cshlib'
71
72 $CC -o build/default/node -Isrc src/node_main.cc -lnode -Lbuild/default
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76 export PYTHONPATH=tools
77 %{__python} tools/waf-light install \
78         --product-type=cshlib \
79         --destdir=$RPM_BUILD_ROOT
80
81 install -p build/default/node $RPM_BUILD_ROOT%{_bindir}/node
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post   -p /sbin/ldconfig
87 %postun -p /sbin/ldconfig
88
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) %{_libdir}/libnode.so.*.*.*
94 %ghost %{_libdir}/libnode.so.4
95 %dir %{_libdir}/node
96 %{_mandir}/man1/node.1*
97
98 %files devel
99 %defattr(644,root,root,755)
100 %{_libdir}/libnode.so
101 %{_includedir}/node
102 %attr(755,root,root) %{_bindir}/node-waf
103 %dir %{_libdir}/node/wafadmin
104 %dir %{_libdir}/node/wafadmin/Tools
105 %{_libdir}/node/wafadmin/*.py
106 %{_libdir}/node/wafadmin/Tools/*.py
107 %{_pkgconfigdir}/nodejs.pc
This page took 0.343061 seconds and 3 git commands to generate.